Membership is FREE – with unlimited access to all features, tools, and discussions. Premium accounts get benefits like banner ads and newsletter exposure. ✅ Signature links are now free for all. 🚫 No AI-generated (LLM) posts allowed. Share your own thoughts and experience — accounts may be terminated for violations.

How to duplicate a directory in bulk in linux?

Status
Not open for further replies.

yesonline

New Member
The Originals
Legacy Platinum Member
Joined
May 6, 2002
Messages
902
Reaction score
10
Hello, I am using Linux RH8 now, and I want to copy (duplicate ) one directory named A to a new directory named A1, so I type "cp -R A A1 " and it's done, that is ok to me.
But if I want to copy A to a hundred new directories, do I have to type " cp -R A A1 " "cp -R A A2" " cp -R A A3"..... " cp -R A A200" ?
Is there any idea how can I do it once to copy and duplicate in bulk?
Some body told me using Bash Script, unfortunately I have no idea what it is, and I have to do this copy now, any idea?


Thanks in advance:)
 

DrWho

New Member
The Originals
Legacy Gold Member
Joined
Oct 28, 2002
Messages
3,940
Reaction score
0
You can write the script in any shell. (i.e., csh, bash, sh, ksh, perl)


Doc
 

yesonline

New Member
The Originals
Legacy Platinum Member
Joined
May 6, 2002
Messages
902
Reaction score
10
Thank you for all your replies, and I've got my answer from a BBS in Taiwan:razz:
 
Status
Not open for further replies.
Top Bottom