I have the following problem. I want to compress many files that are located in different paths i.e. /path1/file1, /path1/file2, /path2/file3 and so on on single file and I want to remove the folder structure. After this I want to put all in pipe with ssh command and then to decompress the archive in the server.
I'm using the following command
it works only in part since it maintains the structure of the origin folder in the server.Code:tar -jcf - /path1/file1 /path1/file2 /path2/file3 | ssh user@ip 'tar -C /path/ -jxf -'
How can I do?