rename example

From thelinuxwiki
Jump to: navigation, search
$ ls *.txt                                                                                                                            
oldfile1.txt  oldfile2.txt  oldfile3.txt
$ rename -v oldfile newfile *.txt                                                                                                     
`oldfile1.txt' -> `newfile1.txt'
`oldfile2.txt' -> `newfile2.txt'
`oldfile3.txt' -> `newfile3.txt'
$ ls *.txt                                                                                                                            
newfile1.txt  newfile2.txt  newfile3.txt