Remove file start with special character
0 votos
December 5th, 2006 mysurface Posted in Common, mv, rm, touch | Hits: 10416 |
In linux, file can be any name, including “–testing”. If you have a file with this name, how you delete it?
Command line bellow will fail,
rm --testing
The correct one is
rm ./--testing
This works for mv, cp etc. So you can actually create a file with name “–testing” using touch.
touch ./--testing
Live Chat!









December 6th, 2006 at 11:15 pm
Alternatively, you can use
March 21st, 2007 at 8:54 pm
[...] Sometimes, you may find some file you can’t delete because of the filename begins with minus(-). LBE have that example on the post “Remove file start with special character”, as simple as this [...]
October 6th, 2007 at 1:25 pm
[...] Remove file start with special character [...]