LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-20-2006, 07:53 PM   #1
manishsingh4u
Member
 
Registered: Oct 2005
Location: Bhopal, India
Distribution: RHEL 6
Posts: 422

Rep: Reputation: 30
how to rename muliple files


Hello Friends,
I have used rename command many times with Fedora Core but, the same is not working with Ubuntu 5.10. suppose, if I wish to change all files with "dll" extension to "mp3", I could use
Code:
rename .dll .mp3 *.dll
But, this doesn't work with Ubuntu.
Code:
root@Manish:/var/www/fc# rename .dll .mp3 *.dll
syntax error at (eval 1) line 1, near "."
root@Manish:/var/www/fc#
OR
Code:
root@Manish:/var/www/fc# rename dll mp3 *.dll
Bareword "dll" not allowed while "strict subs" in use at (eval 1) line 1.
root@Manish:/var/www/fc#
So, how do I rename my files now?
 
Old 05-20-2006, 09:12 PM   #2
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Rep: Reputation: 100Reputation: 100
Try krename:
http://www.krename.net/
 
Old 05-21-2006, 05:27 AM   #3
manishsingh4u
Member
 
Registered: Oct 2005
Location: Bhopal, India
Distribution: RHEL 6
Posts: 422

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Linux.tar.gz
Thanks. krename is good.
 
Old 05-21-2006, 06:17 AM   #4
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
in ubuntu, rename is a perl script called prename. get the real rename.
 
Old 05-21-2006, 06:35 AM   #5
manishsingh4u
Member
 
Registered: Oct 2005
Location: Bhopal, India
Distribution: RHEL 6
Posts: 422

Original Poster
Rep: Reputation: 30
So, how to get the orginal rename command?
 
Old 05-21-2006, 06:56 AM   #6
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
it's part of util-linux. maybe compile the package, then just copy rename into /usr/bin

ftp://ftp.kernel.org/pub/linux/utils/util-linux/
 
Old 05-21-2006, 07:59 AM   #7
manishsingh4u
Member
 
Registered: Oct 2005
Location: Bhopal, India
Distribution: RHEL 6
Posts: 422

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by whansard
it's part of util-linux. maybe compile the package, then just copy rename into /usr/bin
Oh thanks
 
  


Reply



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 Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to rename many similar files? NightStranger Linux - Newbie 7 10-04-2006 02:43 AM
script to rename muliple files cranium2004 Programming 3 02-21-2006 10:59 PM
rename files allelopath Linux - General 5 07-05-2005 03:00 AM
Can not rename files. Maximus2000 Linux - General 0 04-22-2004 01:36 PM
How to open/rename files like this... Mega Man X Linux - General 4 05-08-2003 11:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration