Skip to content

Instantly share code, notes, and snippets.

@palashkulsh
Created November 28, 2020 09:46
Show Gist options
  • Save palashkulsh/efd796870df269ef141f66f968814da2 to your computer and use it in GitHub Desktop.
Save palashkulsh/efd796870df269ef141f66f968814da2 to your computer and use it in GitHub Desktop.
rename folders and subfolders using find and rename
find . -maxdepth 2 -type d -exec rename 's/\/([1-9]\.)/\/0$1/g' {}/ \;
# it prepends zero in folder names
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment