Skip to content

Instantly share code, notes, and snippets.

@softstar1990
Created August 11, 2014 23:41
Show Gist options
  • Save softstar1990/c8d67ead44b886bdca19 to your computer and use it in GitHub Desktop.
Save softstar1990/c8d67ead44b886bdca19 to your computer and use it in GitHub Desktop.
rename files in a folder
#!/bin/bash
ls | while read -r FILE
do
mv -v "$FILE" `echo $FILE | tr ' ' '_' `
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment