Bash rename files

From I Will Fear No Evil
Revision as of 14:43, 3 April 2025 by Chubbard (talk | contribs) (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")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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 \;