![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need help renaming files | bbbngowc | UNIX for Dummies Questions & Answers | 5 | 04-23-2008 11:08 AM |
| Renaming Files | abch624 | Shell Programming and Scripting | 2 | 03-19-2008 08:54 PM |
| renaming files | jxh461 | UNIX for Dummies Questions & Answers | 1 | 02-04-2008 05:32 PM |
| Renaming files | Tygoon | UNIX for Dummies Questions & Answers | 7 | 01-06-2008 06:59 PM |
| renaming files | systemsb | UNIX for Dummies Questions & Answers | 3 | 05-24-2006 09:56 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
renaming files
i have a set of *.lst files. now i want to change the names from "lst" to "dat". how to do it?
ex.: -rw-r--r-- 1 rram group 22 Sep 21 13:10 a.lst -rw-r--r-- 1 rram group 22 Sep 21 13:09 b.lst -rw-r--r-- 1 rram group 22 Sep 21 13:10 c.lst -rw-r--r-- 1 rram group 22 Sep 21 13:10 d.lst i want to change all the files suffix to "dat" from "lst" Replies appreciated. raguram R
__________________
raguram r |
| Forum Sponsor | ||
|
|
|
|||
|
Hi,
I think you can test this : for i in `ls -al /YOUR_PATH | awk '{print $9}' |grep .lst` do u=`ls $i| sed 's/.lst/.dat/g'` mv $i $u done if you want to change all the .lst file it will be right. Alex' |
|||
| Google The UNIX and Linux Forums |