[X-Unix] Using the CLI to delete "pesky" files/folders

Mark Gibson gibsonm at bigpond.net.au
Sun Apr 24 20:47:02 PDT 2005


At 23:28 -0400 24/4/05, John Harrold wrote:
>Sometime in April Mark Gibson assaulted the keyboard and produced:
>|
>
>Disclaimer: I'm a Linux user who got a powerbook in February, and I'm
>speculating here.
>
>| Do I need to restart before the GUI catches up?
>
>I doubt it.
>
>| If the files are from a volume other than the boot volume do I need
>| to try there too (or is the trash information for all volumes stored
>| in ~/.Trash)?
>
>Poking about I noticed that there is a directory in root called .Trashes.
>You can try looking in there to see if what you want to delete is in that
>directory. Try something like:
>
>sudo su -
>ls -al /.Trashes
>
>If you see it there you can delete by doing the following (as root):
>
>rm -rf /.Trashes/*.*
>
>If you don't see it, check the root of where other volumes that are
>mounted. For example if you have something mounted as /Volumes/bob list all
>the directory contents:
>
>ls -al /Volumes/bob
>
>and look for something that looks like trash. If you see a directory there,
>try to delete it's contents.
>
>Be careful running commands like 'rm -rf' as root because you can really
>screw things up if your are not careful ;).

John,

OK I found them:

>Home-Server:~ gibsonm$ sudo su -
>Home-Server:~ root# ls -al /Volumes/Leviathan/.Trashes
>total 0
>d-wx-wx-wt   3 root  admin    102 27 Jun  2004 .
>drwxrwxrwx  29 root  admin    986 25 Apr 09:49 ..
>drwx------   4 root  unknown  136 25 Apr 13:11 501
>Home-Server:~ root# ls -al /Volumes/Leviathan/.Trashes/501
>total 0
>drwx------  4 root  unknown  136 25 Apr 13:11 .
>d-wx-wx-wt  3 root  admin    102 27 Jun  2004 ..
>drwxrwxr-t  3 root  admin    102 23 Apr 08:29 Alfred Hitchcock
>drwxrwxr-t  3 root  admin    102 23 Apr 07:38 HD 20Gb
>Home-Server:~ root# rm -rf /Volumes/Leviathan/.Trashes/*.*
>Home-Server:~ root# rm -rf /Volumes/Leviathan/.Trashes/501/*.*
>Home-Server:~ root# rm -rf /Volumes/Leviathan/.Trashes/501/  

But the last three commands haven't removed them.

The two folders in question are "HD 20Gb" (which 
I understand is HD_20Gb in UNIX) and "Alfred 
Hitchcock" (again Alfred_Hitchcock" in UNIX).

-- 

Regards,

Mark (}-:
+61 (0)4 1927 7198
Skype / AIM / iChat: gibsonm1

Gémir, pleurer, prier, est également lâche.
Fais énergiquement ta longue et lourde tâche,
Dans la voie où le Sort a voulu t'appeler,
Puis, après, comme moi, souffre et meurs sans parler.  -- Vigny



More information about the X-Unix mailing list