MultiCopy: copy a file to multiple destinations
Often i have to copy manually a single file into many destination directories (or files), so i decided to create a command line tool to do help me in doing this task: Multicopy (mcp). The program can be used as show below:
- mcp <src_file> <directory_1> <directory_2> ... <directory_n> copy file <src_file> into the given directories
- mcp <src_file> <file_1> <file_2> ... <file_n> copy file <src_file> into given files (creating/overwriting them)
- mcp -b <byte_buffer> <src_file> <directory_1> <directory_2> ... <directory_n> copy file <src_file> into given directories using a buffer of <byte_buffer> bytes
- mcp -b <byte_buffer> <src_file> <file_1> <file_2> ... <file_n> copy file <src_file> into given files (creating/overwriting them) using a buffer of <byte_buffer> bytes
- copy file /tmp/test.txt into directory /home/davide/ and into file /usr/local/copia.txt
mcp /tmp/test.txt /home/davide/ /usr/local/copia.txt
- copy file /tmp/test.txt into /tmp/uno.txt and /tmp/due.txt, reading/writing blocks of 4096 bytes
mcp -b 4096 /tmp/test.txt /tmp/uno.txt /tmp/due.txt
- copy file -b into /tmp/prova and /tmp/prova2
mcp -- -b /tmp/prova /tmp/prova2