This will add the flv extension to all files in the current directory:
Code:
rename -n 's/$/.flv/' *
Rename is actually quite easy. The general format is:
Code:
rename 's/old/new/' files
S means substitute. Old is the string that will be replaced. New is the string that will be substituted. Files are the files that will be renamed.
The following are refinements:
Change only at beginning of name: 's/^old/new/'
Change only at end of name: 's/old$/new/'
Change all instances of old: 's/old/new/g'
Have a look at the following page which provides additional detail:
http://tips.webdesign10.com/how-to-b...n-the-terminal
Bookmarks