Often in Bash you may want to rename all files in a particular directory to lowercase.
You can use the following syntax to do so:
for file in * ; do
mv "$file" "${file,,}"
done
This particular example will rename all files in the current directory to lowercase.
Note that this syntax uses the ${file,,} syntax to convert the filenames to lowercase, which is known as shell parameter expansion.
You can find the complete documentation for shell parameter expansion here.
The following example shows how to use this syntax in practice.
Example: How to Rename All Files to Lowercase in Bash
We can use the ls command to first view all files in our current directory:

We can see that the current directory has the following files:
- COACHES.txt
- Leagues.txt
- TEAMS.txt
- rosters.txt
Suppose that we would like to rename each of these filenames to lowercase.
We can use the following syntax to do so:
for file in * ; do
mv "$file" "${file,,}"
done
The following screenshot shows how to use this syntax in practice:

Notice that when we use the ls command once again to view the updated filenames in the current directory we can see that all filenames have been converted to lowercase:
- coaches.txt
- leagues.txt
- teams.txt
- rosters.txt
Feel free to use similar syntax to rename the files in your own folder to lowercase.
Note #1: If any filenames are already lowercase then Bash will simply output the filename and note that it is the “same file” as an already existing file.
Note #2: If you would only like to convert specific files to lowercase then you can replace * with *.txt, *.csv, etc.
Related Tutorials
The following tutorials explain how to perform other common tasks in Bash:
Bash: How to Add Prefix to All Files in Directory
Bash: How to Replace Specific Text in Multiple Files
Bash: How to Replace Specific Line in File
