https://stackoverflow.com/questions/3211595/renaming-files-in-a-folder-to-sequential-numbers
νμΌ μ΄λ¦μ κ·Έλ₯ μΉ μμλ‘ λ°κΎΈκ³ μΆμ λ
ls | cat -n | while read n f; do mv "$f" `printf "%04d.extension" $n`; done
$ ls
bash caddy django docker leetcode python
$ ls | cat -n
1 bash
2 caddy
3 django
4 docker
5 leetcode
6 python
while read n f
μ΄κ±°λ νν μ½λ―μ΄ λΌμΈλλ²λ νμΌλͺ
μ νμ±ν΄μ 루ν μμ μ§μ΄ λ£μ΄μ£Όλκ±°