One can use 'rename' command to rename the files. rename gives the user the flexibility of conditional renaming.
We can use rename command to rename only the file names that contain a particular string to new filename.
::syntax::
$ rename 's/old_filename/new_filename/' *
::explanation::
s stands for substitute.
oldfilename is the text to find in the name of the file
new_filename is the text to be replaced
* denotes all files in the current directory structure
Below is a snapshot of the terminal which explains rename command.
We can use rename command to rename only the file names that contain a particular string to new filename.
::syntax::
$ rename 's/old_filename/new_filename/' *
::explanation::
s stands for substitute.
oldfilename is the text to find in the name of the file
new_filename is the text to be replaced
* denotes all files in the current directory structure
Below is a snapshot of the terminal which explains rename command.
![]() |
rename command [click on the image to enlarge] |
No comments :
Post a Comment