Re: removing garbarge in file system by inode number...

Rupa Schomaker (rupa-list@rupa.com)
24 Oct 1999 11:47:47 -0700


Marty Leisner <leisner@rochester.rr.com> writes:

> For some reason, ftpd left some garbage in my ftp directory:
>
> 227329 drwxr-xr-x 3 ftp ftp 1024 Sep 6 13:37
> ???????????????????????????????????????????????????????????????????????????????
> ???????????????????????????????????????????????????????????????????????????????
> ??????????????????????????????????????????
>
>
> This is a tree of directories (I don't know how deep it goes) (I ran ls -li),
> some of the entries appear to be blank (i.e. in fr I get /////)
>
> What tool/metholodgies/reading to you recommend? (I essentially want to
> do rm -rf by inode number).

The trick I use is:

$ touch blah
$ ls -i blah
337929 blah
$ find . -inum 337929 -exec rm {} \;

If it is a tree, you can rm -rf the top entry and it should clean up
the rest.

-- 
Rupa (rupa@rupa.com for normal email)
Please don't email duplicate replies.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/