Further investigation, I found that the folder is in kind of nested loop endless. It is in my Trash. I don't know why it is like that.
Full Path to the Folder
The first thing I need is to find the path to the folder. The file/folder full path is not obviously available in Finder.
There is a way to obtain the full path from folder's Info. Just locate the folder in Finder, and hit
Command+i
combination keys. This will bring up an info window.For example, the following is the info window for the folder in my Trash.
Highlight
Where
section, kit Command+c
keys to make a copy. This will copy the full path of the folder to clipboard, ready for use.Terminal to Rescue
Use spotlight to open Terminal. This can be easy done by pressingCommand+space
keys, and type in terminal
in spotlight search area. Press enter key to open Terminal
.I remember that there is a command tool to remove folders. It is the command of
rm
.First I have change current location to the path where the folder is. Use the following command
cd
to change the current location or directory or path:- cd /Users/dchu/.Trash
Before removing the folder, I have to make sure the folder is there. Use
ls
command to show the content of the current directory, with -F
switch to show folder:- ls -F
- iPhoneDev copy 6.00.02 PM/
Now it is time to remove the folder. Use
rm
command with -R
switch. This switch will force to remove the folder as well as any contents, such as files and folders, within the folder.- rm -F iPhoneDev\ copy\ 6.00.02\ PM/
iPho
" first, and press tab
key to get the complete name filled out.Kit
enter
key and the folder is gone!Note: there may be spaces within file or folder names. The spaces in a file or folder name can be specified by escape char \, just like above example.
References
- My previous blog: Easy Way to Get File/Folder Path