Advertisement

08.01.2007 at 02:48AM PDT, ID: 22734079
[x]
Attachment Details

Rename some of the files in a directory tree

Asked by addady in Linux

Tags: _old, all, directory, files, rename

Hi,

I would like to rename on file ending with *.*_old to *.*

It work on the current directory well using:
for a in *_old; do mv "$a" "$(echo "$a" | sed 's/_old//')";

How do I expand it so that it will rename all the file in the subdirectories?

Regards,
Addady
Start Free Trial
[+][-]08.01.2007 at 03:46AM PDT, ID: 19607540

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Linux
Tags: _old, all, directory, files, rename
Sign Up Now!
Solution Provided By: xDamox
Participating Experts: 1
Solution Grade: A
 
 
[+][-]08.01.2007 at 04:42AM PDT, ID: 19607829

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.01.2007 at 05:02AM PDT, ID: 19607924

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.01.2007 at 09:46AM PDT, ID: 19610573

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.01.2007 at 09:59AM PDT, ID: 19610701

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32