Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


Closed Thread
  Search this Thread
Old 08-20-2008, 11:29 AM   #1
LQ Newbie
Registered: Aug 2008
Posts: 21

Rep: Reputation: 15
Question copy and rename the existing directory using BASH script

Hi Guys,

i am trying to create a script to copy a single existing directory to multiple copies and rename those copies sequentially in bash script.

for e.g.

my existing directory is Itr1_b1_w1_130 and i want to make multiple copies of this directory and this should be renamed as Itr2_b1_w1_130, Itr3_b1_w1_130....Itr40_b1_w1_130.

I know i have to use the for loop to get this work.

Any help or clues to get this work done would be really helpful.Appreciate your help.


p.s i also posted this in LINUX-newbie forum too.
Old 08-20-2008, 11:35 AM   #2
LQ 5k Club
Registered: May 2003
Location: London, UK
Distribution: Debian "Testing"
Posts: 6,111

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
I think you need to read the LQ Rules:
Especially these bits:

- Do not expect LQ members to do your homework
- Do not post the same discussion in more than one forum.
Old 08-20-2008, 11:37 AM   #3
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
Originally Posted by neo2k View Post
p.s i also posted this in LINUX-newbie forum too.
Multiple posts of the same message is not allowed. If you want the post to be moved to another forum, ask to a moderator. I replied to your other thread. This is reported for closure.
Old 08-20-2008, 11:43 AM   #4
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash - rename directory to overwrite existing LarsWestergren Linux - Newbie 18 04-04-2013 03:07 PM
mulitple copy a existing directory and rename it at the end sequentially in BASH neo2k Linux - Newbie 2 08-20-2008 11:45 AM
To rename files in a directory should I use Bash script or a Perl Script ? jamtech Programming 7 01-23-2008 12:25 AM
[SOLVED] A bash script to automatically copy all documents with directory structure thelordmule Programming 8 11-30-2007 03:30 AM
Bash script to traverse directory tree and rename files intramaweb Programming 3 10-08-2006 01:51 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:04 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration