Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting a file 2

Status
Not open for further replies.

PaulBarbeau

Programmer
Nov 23, 2000
109
CA
I have a file in my "/tmp" that i want to delete that was made by error. the filename is '-20040118_08" how did i delete it. everthing i do thinks the -2 is an argument.

Paul




 
Try an absolute path
[tt]rm /tmp/-20040118_08[/tt]

Try with the current directory specified
[tt]rm ./-20040118_08[/tt]

Try an end of option switch
[tt]rm -- -20040118_08[/tt]

Try a wildcard on some other part of the file (test with ls first to make sure it only matches one file)
[tt]rm *0118_08[/tt]

--
 
Thanks the absolute one work. i had tried the other with no luck.. thanks for your help

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top