Last active
December 10, 2019 23:58
-
-
Save rdlmda/9027295 to your computer and use it in GitHub Desktop.
Rename or remove files with special chars on Linux
This file contains hidden or 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
| Sometimes you end up with a filename that is hard to address on the command line because it has special characters in its name. | |
| In some cases you can get away with prepending a ./ or quoting, or escaping with backslash. When those don't work, this can get you out of trouble. |
This file contains hidden or 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 or remove files with special chars on linux | |
| ls -hail #take note of the inode number | |
| find . -type f -inum 123456789 -exec mv {} safename \; #replace the inode number here |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sometimes you end up with a filename that is hard to address on the command line because it has special characters in its name. In some cases you can get away with prepending a ./ or quoting, or escaping with backslash. When those don't work, this can get you out of trouble.