Created
January 9, 2014 08:45
-
-
Save yqt/8331250 to your computer and use it in GitHub Desktop.
Rename file starting with a dash(-)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rename file starting with a dash(-) | |
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 | |
commands. | |
cp ./* /some/folder | |
cp -- * /some/folder | |
And the same for other utilities too. | |
mv ./-stuff differentstuff | |
mv -- -stuff differentstuff |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment