Forrest logo
back to the ls tool

ls:ai:38f90

List all pdf files, sort by size, and rename by progressive number
$ ls -Sl --format='json' | awk 'BEGIN{c=1} {print "mv -i ",$0, "",c++.".pdf"}' | bash
try on your machine

List all pdf files, sort by size, and rename by progressive number

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.

Questions that are answered by this command:

  • list all pdf files, sort by size and rename by progressive number?
back to the ls tool