![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SED - editing file names (End of line problem?) | busillis | Shell Programming and Scripting | 1 | 03-23-2008 08:59 AM |
| changing multiple directory names w/ sed | RahJiggah | OS X (Apple) | 1 | 11-05-2007 01:55 PM |
| editing sqlplus id@passwd in multiple scripts, users and directories | Helmi | UNIX for Dummies Questions & Answers | 8 | 05-09-2007 12:02 AM |
| Using Sendmail for multiple domain names | captainash | UNIX for Dummies Questions & Answers | 1 | 01-16-2004 12:28 PM |
| Editing one string in multiple files | Skoshi | UNIX for Dummies Questions & Answers | 1 | 11-10-2001 02:13 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Editing multiple file names in one go
Hi there,
I have a folder full of pdf's and I've run a compression on the to reduce the size, the output of the compress places a '-o' in the name of the file. Before 12345.pdf After 12345-o.pdf Now I've got around 50000 files that I need to change back to the previous name, is there a script that can be used to do this? Any help is much appriciated. Regards Kees |
|
||||
|
Code:
ls *o.pdf | while read file do mv "$file" `echo $file | sed 's/-o//'` done |
| Sponsored Links | ||
|
|