Bash rename files: Difference between revisions

From I Will Fear No Evil
Jump to navigation Jump to search
(Created page with "==Rename files that have reserved characters== When ls is showing that funny diamond-question value in the output or you see a litteral $ in the filename, here is the fix I was able to use... <pre> ls output via -b N\343o_Wave via ls -i 213764100 'N'$'\343''o_Wave' # Use the inode value to move the file to something typable find . -maxdepth 1 -inum 213764100 -exec mv {} N_o_Wave \; </pre> Category:Bash")
 
(No difference)

Latest revision as of 14:43, 3 April 2025

Rename files that have reserved characters

When ls is showing that funny diamond-question value in the output or you see a litteral $ in the filename, here is the fix I was able to use...

ls output via -b
N\343o_Wave 

via ls -i
213764100 'N'$'\343''o_Wave'

# Use the inode value to move the file to something typable
find . -maxdepth 1 -inum 213764100 -exec mv {} N_o_Wave \;