Today, I receive some request from our mate.
He wants to rename a file which begin a "-" character. haha. Searching on Google and I found this solution.
Thanks guys !
If having problem renaming a file that starts with a dash:
Since the file name begins with a ‘-‘ it looks like an option to the
command. You need to force it to not look like an option. Put a ./
in the front of it. Or give it the full file name path. Or tell the
command you are through with options by using the double dash to end
all option processing. This is common to most traditional UNIX
cp ./* /some/folder
cp — * /some/folder
And the same for other utilities too.
mv ./-stuff differentstuff
mv — -stuff differentstuff