how to delete a file name call "-D"
how to rm "-D" file name ,thanks
|
Use the cd command to enter the directory with the file, then execute:
Code:
rm ./-D |
thanks very much
|
Just an alternative way..
You can't delete the files beginning with `-' because it will be processed as a command line option wrongly. So you can use `--' switch to tell the program that there will be no command line option anymore, as in Code:
[mbaris@slackware:~]$ touch -- -butterfly |
or you can rename it, and then delete it.. (more effort, but another way :-D )
Code:
mv -D.jpg picture.jpg |
Actually, executing
Code:
mv -D.jpg picture.jpg And, just for a little info, there is a rename command. It's slightly different than what you might expect. You give rename specific text to replace, the text to replace it with, and then a list of files to perform the substitution on. For example Code:
rename jpg jpeg *.jpg You can read all about it with man rename |
All times are GMT -5. The time now is 08:32 PM. |