[NTLUG:Discuss] Re: remove file

jpmiller@quorumhost.com jpmiller at quorumhost.com
Thu Apr 21 12:12:27 CDT 2005


I figured this was a obvious answer and so I didn't bother earlier but I'm
suprise no one has offered what I always thought was the "right" answer...

All these wild card things strike me as sloppy... I was taught that, when it's
important at least, delete funny files by inode instead of by name.

'ls -i' will list the inode and some sort of representation of the filenames.
then
'find . -inum #### -exec rm {} \;' where #### is the inode number you found in
the ls command to delete the file.

if you're nervous, as most admins are, 'find . -inum ####' first just to make
sure you're matching what you think you are matching.

is there some reason not to do it that way?


Quoting Fred <fredstevens at yahoo.com>:

> I think I found the problem, which is trying to do serious
> work too late at night. "rm" got it after I realized that the
> file's 1st char was "E" followed by a long string of crap, so
> rm E* got it. So simple, but not at 1am. I think that I tried
> various combinations, but never just E*. Guess I never
> noticed
> that it was the only file that began with an upper case E.
>
> Oh, well, now it's fixed and thanks for the help.
>
> Fred
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> _______________________________________________
> https://ntlug.org/mailman/listinfo/discuss
>




----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




More information about the Discuss mailing list