Skip to content

Instantly share code, notes, and snippets.

@njanirudh
Last active November 19, 2021 09:03
Show Gist options
  • Save njanirudh/9d607d701696aadd9a62431da31e78d6 to your computer and use it in GitHub Desktop.
Save njanirudh/9d607d701696aadd9a62431da31e78d6 to your computer and use it in GitHub Desktop.
Batch rename files
ls | cat -n | while read n f; do mv "$f" `printf "%04d.jpg" $n`; done
Finds all the executables in the folder (source)[https://superuser.com/questions/492501/how-do-i-list-all-of-the-executables-in-a-linux-directory-sub-dirs-path]
find . -type f –executable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment