Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Disk Target Mode Delete problem

Disk Target Mode Delete problem
Thread Tools
Mac Elite
Join Date: Aug 2005
Location: Vancouver, BC
Status: Online
Reply With Quote
Oct 8, 2005, 02:20 PM
 
Hopefully this isn't too dumb a question - I tried doing a forum search but haven't come up with anything to answer this one....

I deleted several files (over 30G worth) from my iBook while it was in disk target mode. I emptied the trash on the host computer and all seemed fine (though the deleted files from the iBook don't actualy go to the trash, I know). But now when I boot the iBook in normal mode, the files appear to be deleted - i.e. they are missing from the folder listings - but the space is still being taken up on my harddrive. If I knew squat about Unix I'm sure I wouldn't be posting here but.... Help!
     
Senior User
Join Date: Dec 2001
Location: Land of Enchantment
Status: Offline
Reply With Quote
Oct 8, 2005, 03:44 PM
 
Did you empty the trash on the iBook? It is possible that the deleted files are in there.
     
Mac Elite
Join Date: Aug 2005
Location: Vancouver, BC
Status: Online
Reply With Quote
Oct 8, 2005, 03:49 PM
 
Originally Posted by jmiddel
Did you empty the trash on the iBook? It is possible that the deleted files are in there.
No, the files weren't in the iBooks trash - but I did empty it just for kicks with no effect.
     
Moderator
Join Date: May 2001
Location: Hilbert space
Status: Offline
Reply With Quote
Oct 8, 2005, 05:57 PM
 
There is a trash folder on each volume. So if you empty the trash, it does exactly that on all volumes. I hope you have a backup of your data

If not, don't touch your iBook and run undelete software on it.
I don't suffer from insanity, I enjoy every minute of it.
     
Grizzled Veteran
Join Date: Mar 2004
Status: Offline
Reply With Quote
Oct 9, 2005, 12:49 AM
 
Originally Posted by gradient
But now when I boot the iBook in normal mode, the files appear to be deleted - i.e. they are missing from the folder listings - but the space is still being taken up on my harddrive. If I knew squat about Unix I'm sure I wouldn't be posting here but.... Help!
They might be in a subfolder of the volumes' "main" trash, which won't
be visible from any normal user's account (your trash can won't bulge).
I.e., my guess is that they are in:

/.Trashes/0/

or, to be redundant:

/Volumes/YourHDName/.Trashes/0/

The folder named '0' (that's a zero btw) is root owned.

Um, I hesitate to post the rm command that would clear up this mess.
It's a potentially dangerous task for UNIX newbies. Try this first, to see
what's in there. Type (or copy/paste) the following in Terminal:

sudo ls -haloR /.Trashes

(Enter your admin password when prompted. When finished type exit).

--

EDIT: if your HD is partitioned, then this command will cover all bases:

sudo ls -haloR /Volumes/*/.Trashes
(Last edited by Hal Itosis; Oct 9, 2005 at 12:59 AM. )
-HI-
     
Mac Elite
Join Date: Aug 2005
Location: Vancouver, BC
Status: Online
Reply With Quote
Oct 9, 2005, 02:04 AM
 
Originally Posted by Hal Itosis

sudo ls -haloR /.Trashes

(Enter your admin password when prompted. When finished type exit).
I ran this command and got a list of everything i'm looking to get rid of but under the /.Trashes/501/ directory.

What is the significance of the /501/ directory as opposed to the /0/ directory and what are the risks of deleting data in these directories? If you could give me instructions on how to do it along with the risks, so that I can understand what I'm doing more fully, I would appreciate it greatly.
     
Mac Elite
Join Date: Aug 2005
Location: Vancouver, BC
Status: Online
Reply With Quote
Oct 9, 2005, 02:07 AM
 
Originally Posted by OreoCookie
There is a trash folder on each volume. So if you empty the trash, it does exactly that on all volumes. I hope you have a backup of your data

If not, don't touch your iBook and run undelete software on it.
Sorry if I wasn't clear enough - I am trying to delete these files so no worries on having a backup.
     
Grizzled Veteran
Join Date: Mar 2004
Status: Offline
Reply With Quote
Oct 10, 2005, 02:12 AM
 
Originally Posted by gradient
> I ran this command and got a list of everything i'm looking to get rid of
> but under the /.Trashes/501/ directory.
>
> What is the significance of the /501/ directory as opposed to the /0/ directory
> and what are the risks of deleting data in these directories?
Since you said the stuff in there is what you wish gone,
there is no risk in deleting those items in /.Trashes/501/

The risk is mainly if the command gets entered wrong...
it could still "work", except with horrendous results.

Even with copy/paste, I've seen strange effects occur,
(perhaps formatting chars on the web page or something).

The 501 indicates the first user account. Now I got the picture,
you were logged into your G5 as the primary account (501), and
when trashing items on the iBook (a FireWire volume in target mode),
they went into /Volumes/iBook/.Trashes/501/ as they should.

What puzzles me is why they don't bulge your trash now (?).
I can only guess you're logged in as user id 502 (or higher) on
the iBook now. Is that right? What number do you see if you
type this in Terminal?:

id -u


Originally Posted by gradient
> If you could give me instructions on how to do it along with the risks,
so that I can understand what I'm doing more fully, I would appreciate it greatly.
Basically the command would be:

sudo rm -fR /.Trashes/501/*

NOTES:

1) The asterisk at the end is part of the command.
[it is NOT indicating a note somewhere down below].
It makes (almost) everything inside the 501 folder
go away, but not the 501 folder itself.

2) If you put a space between the / and the .
you will have a VERY BAD day... so don't do that!
(That's like saying "erase my entire HD first").
In fact... there's several other places there where
a space could spell DISASTER. (UNIX is extremely
powerful and very unforgiving. Watch out!!!).

3) It may be best to create a **plain text** document
with TextEdit, and paste the command there first to
have a look... and then copy it from the plain text doc
before pasting into Terminal. (That should clean it up).

4) To the best of my knowledge, what I have instructed
is 100% right... but I'm only human. You should study up
on some UNIX (e.g., type "man rm" in Terminal). I can't be
held responsible if things go wrong. (Just be very careful,
it should be fine).

(Last edited by Hal Itosis; Oct 10, 2005 at 02:22 AM. )
-HI-
     
Mac Elite
Join Date: Aug 2005
Location: Vancouver, BC
Status: Online
Reply With Quote
Oct 11, 2005, 01:02 AM
 
Originally Posted by Hal Itosis

id -u
oddly, when I run this command i get 501 as a result but nothing is bulding in my trash.
     
Mac Elite
Join Date: Aug 2005
Location: Vancouver, BC
Status: Online
Reply With Quote
Oct 11, 2005, 01:06 AM
 
Originally Posted by Hal Itosis

sudo rm -fR /.Trashes/501/*
I ran this command successfully and regained what was actually 32 gigs of free space. Hazzaah!! Thanks for your help but I'm wondering if you have any other ideas as to how this may have happened so that I can avoid it in the future.

Cheers.
     
Grizzled Veteran
Join Date: Mar 2004
Status: Offline
Reply With Quote
Oct 11, 2005, 11:45 AM
 
Originally Posted by gradient
I'm wondering if you have any other ideas as to how this may have happened so that I can avoid it in the future. .
Nothing comes immediately to mind.
I suggest you repair permissions tho.

(both Macs)

--

Re: "avoiding"

In general... if I had to delete some 30 gigs (!!!) of data,
I wouldn't _move_ it all into the trash, and then _empty_
the trash. It would be more effective to simply delete any
undesirables 'in place', using the same rm command that
cleared up this issue. (Once the syntax is more familiar).
(Last edited by Hal Itosis; Oct 11, 2005 at 11:58 AM. )
-HI-
     
Mac Enthusiast
Join Date: Mar 1999
Location: Portland, Oregon, United States
Status: Offline
Reply With Quote
Oct 11, 2005, 01:00 PM
 
Another (safer) way of accomplishing this would be to use the mv command instead of rm... first create a folder on the desktop called NewFolder then enter the following command.

sudo mv /.Trashes/501 ~/Desktop/NewFolder

This will move all these files into the new folder on the desktop. You can then safely drag the folder to the trash. I would agree that you certainly should repair permissions as this shouldn't have ever happend in the first place.

I realize that deleting the 501 folder is not ideal, however I've done it before and at some point the OS recreates it with no further issues. This may not apply to all UNICES, however 10.3 and up seem to have no issues with this folder being missing.
--Laurence
     
Mac Elite
Join Date: Aug 2005
Location: Vancouver, BC
Status: Online
Reply With Quote
Oct 11, 2005, 01:19 PM
 
Thanks guys for your help - I did repair permissions early in the problem (before I posted the first time) just to be sure but I've done it again. It's a bit disturbing to find out that my system seems to have done something completely unconventionala, though. I'm going away on a trip next week and think I might just do a complete partioned re-install before I go anyway. My iBook still has the original factory OS X installation - looks like a couple of apple geek ghosts may have found their way into it!
     
Grizzled Veteran
Join Date: Mar 2004
Status: Offline
Reply With Quote
Oct 11, 2005, 10:13 PM
 
Given the workout this iBook's
catalog file has been through,
I'd let DiskWarrior optimize it.
-HI-
     
   
Thread Tools
Forum Links
Forum 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 On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:17 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2