Here is an example. This is a filename with an invalid character, "-", in front of it.
# cd /tmp
# ls
-esofthub
# rm /-esofthub
or
# rm -- -esofthub
or by inode
# ls -i
# find . -inum 968746 -exec rm -i {} \;
This blog covers Unix system administration HOWTO tips for using inline for loops, find command, Unix scripting, configuration, SQL, various Unix-based tools, and command line interface syntax. The Unix OS supports tasks such as running hardware, device drivers, peripherals and third party applications. Share tips/comments. Read the comments. But most importantly: Read Disclaimer - Read Disclaimer.
6 comments:
Thanks. I've had to use this twice so far.
I appreciate the comment and glad the post was able to help you.
Hey thanks. I had a file named \ (backslash).
to get rid of it:
rm -i {} \;
worked.
this really helped a lot
thanks!
- hectorjohn@yahoo.com
hectorjohn,
I'm glad you found it useful and thank you for your comment.
Roy
This is really cool! It help me a lot to delete these wired files. Thanks for posting it.
Post a Comment