View Full Version : Trying to delete a folder
nemac
March 21st, 2009, 02:42 PM
I have a NAS system at home and I created a folder using the Mac. The particulars for the folder are as follows:
drwx------ 1 javier_s5 staff 16384 Dec 30 11:10 Picture_Frame_old
The folder is empty, however when I try to delete the folder via the gui, I get a message that says the folder cannot be deleted because it is being used. Mind you I am not inside the folder at the time I try to delete the folder. I then start a terminal session and issue the following command:
rmdir Picture_Frame_old/
rmdir: Picture_Frame_old/: Directory not empty
As you can see, the error message states the directory is not empty, which I guess is true since there are the two normal links inside. Namely "., and ..". How can I delete the folder? I know it should not bother me since it is empty, but it is nagging me that I can't remove the directory.
TIA
Javier
chevy
March 21st, 2009, 03:16 PM
Did you try "rm -R" ?
nemac
March 21st, 2009, 06:36 PM
Duh, what a dummy. I never even thought about that. Thanks that did the trick. I still don't know what was preventing me from deleting the folder in the first place since the folder appeared to be be empty. Regardless, thank you again for the advice. That did the trick.
HazardousPaste
April 6th, 2009, 04:45 AM
Duh, what a dummy. I never even thought about that. Thanks that did the trick. I still don't know what was preventing me from deleting the folder in the first place since the folder appeared to be be empty. Regardless, thank you again for the advice. That did the trick.
Folders usually aren't really "empty", but it's annoying when Finder claims it's in use because of the hidden .DS_STORE file or similar nonsense.
Anyway, obligatory word of caution for future users about the
rm
Terminal command: If you can avoid it, do not use it. rm is very powerful and does not ask for authorization. Simple errors like inserting an extra space, a wildcard character when you don't want one, or a misspelling can be disastrous, and there is no easy way to recover your system files other than reinstalling. To try to reduce the risk, try
ls [filename]
first, to see that you're looking at the right file. Then press the down arrow to bring up the previous command and scroll to the left to change the "ls" to "rm."
nemac
April 6th, 2009, 06:40 AM
I believe the folder was empty as I did issue the 'ls -al' command and all that came back was '..' and '.'. I did not see the '.DS_STORE' file.
Satcomer
April 7th, 2009, 09:37 PM
I believe the folder was empty as I did issue the 'ls -al' command and all that came back was '..' and '.'. I did not see the '.DS_STORE' file.
Well don't make them anymore. You can open /Applications/Utilities/Terminal and type: defaults write com.apple.desktopservices DSDontWriteNetworkStores true
Also you could download the freeware application TinkerTool (http://www.bresink.com/osx/TinkerTool.html) and just put a check mark in the box to stop the DS_Store files on network volumes (there are kept invisible buy putting a period in from of the first letter. The DS_Store files are OS X's way of keeping Finder windows open in the way you want it look.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by
vBSEO 3.3.0 RC1