Theo Pepler
Home |
Research |
Teaching |
Software |
Links |
HOWTO's
HOWTO: RENAME MULTIPLE FILES SIMULTANEOUSLY USING THE RENAME PROGRAM
File names containing spaces can be troublesome in Linux. Use the
rename program as a shortcut to the arduous process of renaming files individually.
- Install the rename program using
sudo apt install rename
- To replace spaces with dashes in all file names in the current directory, for example, use
rename 's/ /-/g' *
- Alternatively, to change the names of files in the current directory and all subdirectories, use **
rename 's/ /-/g' **
Source:
Post on Linux Handbook.