Archive

Posts Tagged ‘delete’

Unix delete or rename a file starting with hyphen or junk character

April 27th, 2010 admin No comments

Many a times we face a problem wherein mistakenly some files get created in a directory which are hard to rename or remove especially when working with putty terminal, by mistake if you paste come content on command prompt then it will create junk files with hyphen, tilde or any junk character in beginning.

For example “-abc”, “~abc” etc.

Solution:

In this case “rm -abc” or “rm ~abc” etc will not work. Simple solution is to use “rm ./-abc” or “rm./~abc” etc

:)

Post to Twitter Post to Digg
  • Share/Bookmark