Removing Files Starting With —
Filed Under
Linux at 28th September 2010 12:48 by
Danny
I encountered an interesting problem today. I created a file called –verbose (obviously I passed the argument incorrectly) but trying to remove it more of an issue.
Typing rm -f --verbose
makes the command rm think it’s a parameter rather than a file.
In the end I used an SFTP connection to remove the file.
Like this:
Like Loading...
About Danny
I.T software professional always studying and applying the knowledge gained and one way of doing this is to blog.
Danny also has participates in a part time project called Energy@Home [http://code.google.com/p/energyathome/] for monitoring energy usage on a premise.
Dedicated to I.T since studying pure Information Technology since the age of 16, Danny Tsang working in the field that he has aimed for since leaving school.
View all posts by Danny →
This entry was posted in
Linux and tagged
SFTP,
verbose. Bookmark the
permalink.
how will this work?
rm ./–verbose
That worked!
Thanks Lee
do rm — –verbose
all posix apps should see the — as the “end of options” , so all other -* should be taken as literal to the command
the comment above is minusminus ( – – ), but the blog replaced that as one big – instead of 2 🙂