Aryan PrajapatKnowledge Contributor
How to copy a file to multiple directories in Linux?
How to copy a file to multiple directories in Linux?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Questions | Answers | Discussions | Knowledge sharing | Communities & more.
We can copy a file to multiple directories in Linux by these methods and command xargs, find, tee and shell loop.
xargs command on Unix/Linux operating system converts input from standard input into an argument list for a specified command.
The command find initiates a search and allows actions to be performed based on the search results.
The tee command reads standard input and copies it to both standard outputs and to one or more files.