LinuxQuestions.org
Review your favorite Linux distribution.
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 07-03-2005, 09:44 AM   #1
allelopath
Member
 
Registered: Jan 2003
Location: New Mexico
Distribution: Ubuntu 18.04.3 LTS
Posts: 539

Rep: Reputation: 30
rename files


If i have a directory of files, e.g.

tree.jpg
dog.jpg
dog2.jpg
trail.jpg
bigview.jpg

how do i rename them such that each prefix is appended with "-1024", like so:

tree-1024.jpg
dog-1024.jpg
dog2-1024.jpg
trail-1024.jpg
bigview-1024.jpg

I've played with the rename command, but can't come up with anything that works.
 
Old 07-03-2005, 09:53 AM   #2
Kirmonkey
Member
 
Registered: Jan 2004
Location: UK
Distribution: Debian
Posts: 194

Rep: Reputation: 30
Use,

krename

Application, comes with KDE and may need to be installed

Super useful.

Can be used as a plugin for digicam,

this is super useful too!


The Monkey
 
Old 07-03-2005, 10:21 AM   #3
allelopath
Member
 
Registered: Jan 2003
Location: New Mexico
Distribution: Ubuntu 18.04.3 LTS
Posts: 539

Original Poster
Rep: Reputation: 30
cool, thanks for the tip.
i didn't know about krename.
it works well.
 
Old 07-04-2005, 03:33 PM   #4
newbie007007
Member
 
Registered: Dec 2004
Location: India
Distribution: Fedora
Posts: 36

Rep: Reputation: 15
Can someone tell me how can we do this using shell script???
 
Old 07-05-2005, 02:22 AM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
rename .jpg -1024.jpg *.jpg

No script involved.
 
Old 07-05-2005, 03:00 AM   #6
newbie007007
Member
 
Registered: Dec 2004
Location: India
Distribution: Fedora
Posts: 36

Rep: Reputation: 15
Great!!!!
Thanks alot.
 
  


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
rename all files in a directory merlin23 Linux - Newbie 4 03-24-2005 11:02 AM
Can not rename files. Maximus2000 Linux - General 0 04-22-2004 01:36 PM
Rename files with spaces buzzbuzz Linux - General 26 08-15-2003 06:23 AM
can't rename files in samba Sathe Linux - Networking 3 02-03-2002 05:20 PM

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

All times are GMT -5. The time now is 02:26 AM.

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