I accidentally created a file named '
. Is there a simple way to delete this in bash? Unfortunately, there is already default behavior for rm '
.
1 Answer
Using double quotes around '
:
rm "'"
Using single quote, and escaping:
rm \'
-
-
-
1...and in the general case
rm -i ?
could help, since?
is a wildcard representing any a single character– roaimaOct 25, 2016 at 18:53 -
Just to have some other option:
rm $'\''
also works. ;-)– user232326Oct 26, 2016 at 1:54
rm "'"
would have worked too ;)