image
image

Go Back   macosx.com > Mac Help Forums > Switchers (Windows to Mac Converts)

Reply
 
LinkBack Thread Tools
  #1  
Old March 21st, 2009, 02:42 PM
Registered User
 
Join Date: Mar 2008
Posts: 33
Thanks: 1
Thanked 0 Times in 0 Posts
nemac is on a distinguished road
Trying to delete a folder

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
Reply With Quote
  #2  
Old March 21st, 2009, 03:16 PM
chevy's Avatar
Leopardo Da Vinci
 
Join Date: Nov 2001
Location: Inside the black box, CH
Posts: 3,967
Thanks: 1
Thanked 6 Times in 6 Posts
chevy is on a distinguished road
Did you try "rm -R" ?
__________________
My current machine is an iMac Core 2 Duo 2.16 GHz 24" and a MacBook Pro 13" with MacOS X 10.6. My oldest Apple was born in 1977.
GS/P/>SS d-(++) s+: a+ C+(C) U* P L+ E--- W++ N- o+ K? w O-- M++ V PS+ PE+ Y- PGP t+ 5 X+ R tv-- b+++ DI++ D+ G e+++ h---- r+++ y?
Time is not changing, I'm just traveling through time.
Reply With Quote
  #3  
Old March 21st, 2009, 06:36 PM
Registered User
 
Join Date: Mar 2008
Posts: 33
Thanks: 1
Thanked 0 Times in 0 Posts
nemac is on a distinguished road
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.
Reply With Quote
  #4  
Old April 6th, 2009, 04:45 AM
Registered User
 
Join Date: Mar 2009
Posts: 9
Thanks: 0
Thanked 2 Times in 2 Posts
HazardousPaste is on a distinguished road
Quote:
Originally Posted by nemac View Post
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."
Reply With Quote
  #5  
Old April 6th, 2009, 06:40 AM
Registered User
 
Join Date: Mar 2008
Posts: 33
Thanks: 1
Thanked 0 Times in 0 Posts
nemac is on a distinguished road
Empty folder

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.
Reply With Quote
  #6  
Old April 7th, 2009, 09:37 PM
Satcomer's Avatar
In Geostationary Orbit
 
Join Date: Jul 2002
Location: Northern Virginia
Posts: 7,015
Thanks: 34
Thanked 182 Times in 177 Posts
Satcomer is a jewel in the roughSatcomer is a jewel in the roughSatcomer is a jewel in the roughSatcomer is a jewel in the rough
Quote:
Originally Posted by nemac View Post
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.
__________________
Mac Pro Dual 2.8 Quad (1st gen), 14G Ram, Two DVD-RW Drives, OS X 10.6.2
Mac Book Pro Core 2 Duo 2.16Ghz, SuperDrive, ATI X1600, 2GB RAM, OS X 10.6.2
2TB Time Capsule
32G iPhone 3GS Black
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump


All times are GMT -5. The time now is 03:30 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC1
Copyright 2000-2010 DigitalCrowd, Inc.