Could someone help me delete a directory named -ltr
I accidentally created this when trying to list items.
None of this works:
rm -R *-ltr*
rm -R "-ltr"
rm -R '-ltr'
Could someone help me delete a directory named -ltr
I accidentally created this when trying to list items.
None of this works:
rm -R *-ltr*
rm -R "-ltr"
rm -R '-ltr'
try:
rm -r -- -ltr
man rm:
To remove a file whose name starts with a '-', for example '-foo', use one of these commands:
$ rm -- -foo
OR
$ rm ./-foo
rm -rf ./-ltr
, orrm -rf -- -ltr
. – Satō Katsura Sep 12 '16 at 10:39