Linux/UNIX: Move File Starting With A Dash

Originally published at: https://www.cyberciti.biz/faq/linuxunix-move-file-starting-with-a-dash/

In Unix or Linux operating systems, how do I move file(s) starting with a dash (e.g., /home/you/–filename.txt or /home/you/-filename.txt)? How do I copy a file whose name begins with dash/hyphen ("-")?

mv -- -fileNameStartingWithADash newName
see info coreutils 'Common options'

1 Like