Glam Prestige Journal

Bright entertainment trends with youth appeal.

Path:

/ DIRECTORY_ROOT /SUB_DIRECTORY

And convert that to:

/ directory_root /sub_directory

I tried: rename 'y/A-Z/a-z/' * but it only changes the root directory and not sub directories. I'm new to Ubuntu, thanks for the help!

5

1 Answer

find /path -depth -exec rename 'y/[A-Z]/[a-z]/' {} ";"

Here is a simple directory structure:

$ mkdir -p A/B/C/D
$ tree
.
└── A └── B └── C

and after running rename using find:

$ find /path -depth -exec rename 'y/[A-Z]/[a-z]/' {} ";"
$ tree
.
└── a └── b └── c
2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy