Results 1 to 5 of 5
Hi Troops,
Somehow I managed to create a file in /some/dir/ called "-v"
How can I remove it?
I've tried various and many methods... rm, rm *v, moving all files ...
- 03-26-2009 #1Just Joined!
- Join Date
- Mar 2009
- Posts
- 2
Deleting a nippy file
Hi Troops,
Somehow I managed to create a file in /some/dir/ called "-v"
How can I remove it?
I've tried various and many methods... rm, rm *v, moving all files except that one and then issuing rm -rf but the problem is the -v file is being taken for a switch huh.
Any suggestions, this is driving me nutzola
Regards
Tam
- 03-26-2009 #2Linux Newbie
- Join Date
- Mar 2009
- Posts
- 228
Try specifying the full pathname.
Code:rm -fv /some/dir/-v
- 03-26-2009 #3
Hi there,
This page has the answer:
UNIX man pages : rm ()
In particular:
Code:To remove a file whose name starts with a `-', for example `-foo', use one of these commands: rm -- -foo rm ./-foo
- 03-26-2009 #4Just Joined!
- Join Date
- Mar 2009
- Posts
- 2
Thanks chaps
Cheers guys.
I used lomcevak solution simply as it was the one I saw first and was email alerted to but thanks to ziplock too, I'll remember both methods.
Kindest thanks
Tam
- 03-26-2009 #5


Reply With Quote