How to delete this file: "-d^"?

Dear All,

I am not sure how but I managed to create a file like this:

-rw-rw-r--. 1 fred fred 7.5M Apr 30 23:52 -d^

Somehow I can neither edit this file nor delete it.
Any clue on how I can edit and delete this file?

Many thanks for your help and keep up the good work!

Try mv ./-d^ XX or rm ./-d^

You should also be able to edit or remove it with:

vi -- -d^	# to edit it
rm -- -d^	# to remove it

In case the ^ represents a non-printable character, use a wildcard ? or * instead.

http://www.unix.com/tips-and-tutorials/198879-how-manage-file-names-special-characters.html should be exactly what you are looking for.

I hope this helps.

bakunin

1 Like