![]() |
|
|
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 |
| how to change permissions only to files, not directories....? | narrok | UNIX for Dummies Questions & Answers | 3 | 12-13-2008 03:55 AM |
| Batch changing file extensions | cdines | Shell Programming and Scripting | 5 | 05-19-2008 06:11 AM |
| A Batch job to delete files from various directories | guruparan18 | Shell Programming and Scripting | 3 | 05-10-2008 05:31 PM |
| simple batch renaming...45-*.php to 46-*.php | bcamp1973 | UNIX for Dummies Questions & Answers | 2 | 11-01-2006 10:51 AM |
| Change permission for directories and files | mingfei2006 | Shell Programming and Scripting | 1 | 08-23-2006 08:00 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Hi all -
I'm trying to rename a large number of files all at once and need some help figuring out the command line syntax to do it. I've already done quite a bit of research with the rename and mv commands, but so far haven't found a solution that seems to work for me. So: The files exist here: /public_html/files However, there are many subdirectories within /public_html/files, and the files within those subdirectories must also be renamed with the same operation. (I'm hoping to be able to rename the files in those subdirectories at the same time, since going through every single one of the sub-dirs -- there are 1000s -- would be very time consuming.) The files that need renaming are, shall we say, .zzz files. All of them end in .zzz, but the beginnings of their file names are, of course, different. NOTE: There are OTHER files in these directors that are NOT .zzz files (let's say .jpg files), and those files CANNOT be affected by this rename command. Let's say I would like to rename all .zzz files within all subdirectories to .zzz_disabled (basically, to disable these files from being accessed), but keep the first part of their file names in tact. So: dog_ran_up_the_hill.zzz BECOMES dog_ran_up_the_hill.zzz_disabled And that's pretty much it! I think I've included all necessary info here. Can anyone help me come up with the proper command line syntax to batch rename all the files in all the directories? Thanks so much! |
| Bookmarks |
| Tags |
| batch, command, linux, linux commands, rename, solaris |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|