Trying to delete a folder

nemac

Registered
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
 
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.
 
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

Code:
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

Code:
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."
 
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.
 
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 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.
 
Back
Top