How will I rename every file in a directory to their filenames appending anything?

Mark Jayson Alvarez jay2xra at yahoo.com
Fri Feb 4 00:23:51 PST 2005


Example.
I would want to rename every file that ends in .mp3 to
their filename with appended .old.

so that, test.mp3 will be renamed test.mp3.old?
my initial command would then be:

ls |grep mp3 |xargs -J # mv #..[this part is what
trying to figure out]

How will I tell the mv that its arguments would be the
output of ls and append something like ".old" to it?
~


Thanks!



	
		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail


More information about the freebsd-questions mailing list