Skip to content

Instantly share code, notes, and snippets.

@matsub
Last active June 19, 2016 06:16
Show Gist options
  • Save matsub/63892a0f224020968822 to your computer and use it in GitHub Desktop.
Save matsub/63892a0f224020968822 to your computer and use it in GitHub Desktop.
rename bulk files to sequential numbers.
ary=(`ls -1 *.*`);for i in $(seq -w `ls -U1 | wc -l`);do;mv $ary[i] $i"."${ary[$i]##*.};done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment