• RSS
  • subscribe
  • twitter

How to cancel files with strange names

For Linux platforms only. Often the command rm from the command-line does not help you to cancel a file that begins with the character . This happens because rm interprets the symbol – as the beginning of a flag(option) and so it does not execute it. In this case like in many others where the files name begin with characters like *, &, | , the best way to resolve this problem is to use rm in the following way;

rm — – file_name

The flag“ indicates the name of the file in commas. An alternative could be to specify the complete path of the file to cancel, for example rm /home/kanute/-gray.jpg