• Post Reply Bookmark Topic Watch Topic
  • New Topic

Unix  RSS feed

 
Nags chandru
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do we Delete a file under unix ,which has been created without a valid extension and a - prefix.
ex: -lap
-lap is a file which has been created by the user.
Kindly give me the whole Syntax.
Thanks
Nags
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if you specify the argument -- before a file name, any leading - characters are treated as part of the filename rather than as more arguments, so try something like
rm -- -lap
If not, you can always try using the "interactive" rm for all files ending with 'lap'
rm -i *lap
and only enter 'y' to the one you wish to delete.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!