Skip to content

Instantly share code, notes, and snippets.

@Fallenstedt
Created July 29, 2023 22:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fallenstedt/ad5ebabef594685bf74485603fc39ff5 to your computer and use it in GitHub Desktop.
Save Fallenstedt/ad5ebabef594685bf74485603fc39ff5 to your computer and use it in GitHub Desktop.
Rename files with counter in directory
ls -v | cat -n | while read n f; do mv -n "$f" "$n.ext"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment