How to kill a dir?
Brian Fahrlander
Brian at Fahrlander.net
Mon Jan 5 20:03:36 UTC 2004
On Mon, 2004-01-05 at 13:10, WipeOut wrote:
> Quillen, Channon wrote:
>
> > Try placing the directory name in quotes "" or single quotes ''
> > Eg. rm -fr "test"
> >
> > -Channon
> >
>
> Nope, that didn't help..
>
> Thanks for trying..
OK, time to get out the power tools. (I can't believe no one's
thrown this in already...)
ls -lai <----notice that the 'i' is included. Sample:
Inum: Perms Size, etc...
968014 -rw-rw-r-- 1 brian brian 3885999 Dec 24 15:12 ximian-artwork-0.2.26-1.i386.rpm
968013 -rw-rw-r-- 1 brian brian 327381 Dec 24 15:11 xmms-status-plugin-1.0-2.i386.rpm
968015 -rw-rw-r-- 1 brian brian 320725 Dec 24 15:12 xscorch-0.1.16-0.1pre2.i386.rpm
968016 -rw-rw-r-- 1 brian brian 441488 Dec 24 15:12 zsnes-1.36-3.i386.rpm
Find the directory/file by it's inode number, then
find . -inum 968016 -exec rm {} \;
If it's a directory, (and it's empty) whatever 'find' finds it'll
run the command on, such as removing the 'znes' rpm above. As far as I
know, this'll work on any file or directory, unless the attributes are
changed (like in the previous posts, using chattr) or unless the thing's
a directory that isn't empty.
Enjoy!
--
------------------------------------------------------------------------
Brian Fahrländer Researcher, Conservative, and Technomad
Evansville, IN http://Fahrlander.net
ICQ 5119262 Microsoft never invented email; that was Unix.
------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20040105/ae67eaba/attachment-0001.sig>
More information about the fedora-list
mailing list