Get the App
SLTechnology News&Howtos  ›  Development  › 

How linux copies files to multiple directories

Shulou Source: shulou.com Published: 2022-06-01 05:12:56 11月15日 Update

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!

Tags: Multiple documents directories articles content run not much commands most more knowledge industry information information channels facets channels references learning help Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB OPPO Reno NVidia Shulou Information vpn