REMOVE A FILE STARTING WITH A Dash “-“

Share

ls |grep -i file
–file1

$ rm –file1
rm: illegal option — file1
usage: rm [-fiRr] file …

rm “–file1”
rm: illegal option — file1
usage: rm [-fiRr] file …

Solution:
$ rm ./–file1
$ ls|grep -i file

Share

Comments

comments

Tags: , , , , ,

Leave a Reply