How to copy a file to multiple directories in Linux?

Aaron Lavers

Member
Registered
Joined
May 20, 2016
Messages
61
Points
8
I know using cp command to copy a file to another folder in Linux but i want to copy a file to multiple directories at once time. Is it possible? how can I do this in just one command?
 

LJSHost

Well-known member
Hosting Provider
Registered
Joined
Jul 5, 2016
Messages
1,031
Points
63
Hi Aaron,

Try this

Code:
cat inputfile | tee /directory/outfile1 > /directory/outfile2  > /directory/outfile3
 
Newer Threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top