Forrest logo
back to the find tool

find:ai:abbe7

Rename all files in current directory to max 20 characters
$ find . -maxdepth 1 -type f -exec sh -c 'mv "$1" "${1:0:20}"' _ {} \;
try on your machine

Rename all files in current directory to max 20 characters

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:

  • Rename all files max 20 characters?
back to the find tool