nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

Rename multiple files in UNIX

This is a discussion on Rename multiple files in UNIX within the Getting started tutorials forums, part of the Linux Getting Started category; Use rename command which is a quick and powerful tool written in C, featuring extended regular expression support for searching ...

Go Back   nixCraft Linux Forum > Linux Getting Started > Getting started tutorials

Linux answers from nixCraft.


Getting started tutorials So much to read, so little time! If that is your problem, we have solution. Read our FAQ and tutorials to help you cut through the clutter of information overload. Only members of "contributors" group can post new tutorials. Other members can just reply to thread.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-04-2008, 12:13 AM
sweta's Avatar
Contributors
User
 
Join Date: Feb 2005
Location: New Delhi
Posts: 154
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 5
sweta will become famous soon enough
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
__________________
Friends - v-nessa - missyAdmin - LinuxChix
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-26-2008, 10:44 AM
Junior Member
User
 
Join Date: Oct 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
hostchecker is on a distinguished road
Default

Thanks that helps me a lot
Reply With Quote
Reply

Tags
freebsd , freebsd ports , make , rename


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
script to rm files on multiple servers steve_f60 Shell scripting 1 06-21-2008 10:29 PM
UNIX Display or list number of files in a current directory raj Getting started tutorials 1 12-07-2007 10:55 AM
how to change the format of multiple files in different directories dustcloud4 Shell scripting 0 06-05-2007 03:03 AM
shell script that parses multiple log files and checks for a Anonymous Shell scripting 1 11-15-2006 09:38 PM
UNIX ls only directories (display only dirs and no files) chiku Solaris/OpenSolaris 1 10-21-2006 12:27 AM


All times are GMT +5.5. The time now is 02:23 AM.


Powered by vBulletin® Version 3.8.3 - Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0
©2005-2009 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36