Shell script to rename to lowercase files and directories
In the GNU/Linux world, it is common to use lowercase characters to identify files and directories, to illustrate the above we show the DIRs that are found under the /etc/apache2 DIR on Debian GNU/Linux
/etc/apache2/ ├── conf-available ├── conf-enabled ├── mods-available ├── mods-enabled ├── sites-available └── sites-enabled
so if you have one or several DIRs in uppercase or lowercase and uppercase at the same time and for uniformity want to all be lowercase then you can rely on the following script.
[githubget repo=1]sysadmin/shscript/tolower.sh[/githubget]
To use the script download here
Set execute permissions
chmod a+x tolower.sh
Run the script
./tolower.sh nombre-del-fichero
Further readings
- man find
- man tr
Shell script to rename to lowercase files and directories Read More »