Horje
number all files in a folder Code Example
number all files in a folder
a=1
for i in *.jpg; do
  new=$(printf "%04d.jpg" "$a") #04 pad to length of 4
  mv -i -- "$i" "$new"
  let a=a+1
done
number all files in a folder
ls -v | cat -n | while read n f; do mv -n "$f" "$n.ext"; done 




Shell

Related
bash float operations Code Example bash float operations Code Example
create file from terminal using cat Code Example create file from terminal using cat Code Example
microphone auto adjusting ubuntu Code Example microphone auto adjusting ubuntu Code Example
connect android to linux using scrcpy Code Example connect android to linux using scrcpy Code Example
does Ubuntu MATE have ssh Code Example does Ubuntu MATE have ssh Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11