View Single Post
  #1 (permalink)  
Old 04-10-2008, 12:13 AM
sweta's Avatar
sweta sweta is offline
Contributors
User
 
Join Date: Feb 2005
Location: New Delhi
OS: Suse, RHEL, Vista
Posts: 199
Thanks: 12
Thanked 9 Times in 9 Posts
Rep Power: 7
sweta has a spectacular aura about sweta has a spectacular aura about
Default Rename multiple files in UNIX

Use rename command which is a quick and powerful tool written in C, featuring extended regular expression support for searching and substituting pattern strings in filenames. Rename can rename, convert to lowercase/uppercase, and change the ownership of a large number of files.

Rename all *.c file as *.cpp:
Code:
rename .c .cpp *.c
Rename command is included with all Linux distro, under UNIX / FreeBSD, use ports:
Code:
cd /usr/ports/sysutils/rename
make install clean
See man page:
Code:
man rename
Howto Linux rename multiple files at a shell prompt
__________________
Reply With Quote