How linux copies files to multiple directories
Xiaobian to share with you how linux copies files to multiple directories, I believe most people still do not know how to share this article for your reference, I hope you have a lot of harvest after reading this article, let's go to understand it together!
Copy files to multiple directories
No need to run:
cp /path/to/file /usr/dir1 cp /path/to/file /var/dir2 cp /path/to/file /nas/dir3
Run the following command to copy files into multiple directories:
echo /usr/dir1 /var/dir2 /nas/dir3 |xargs -n 1 cp -v /path/to/file Above is "How linux copies files into multiple directories" All of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!