New answers tagged tar
If you want to archive the /opt directory recursively and save that tar archive to your external USB-harddrive mounted on /media/usb-sdb1-1-7-1, use this: tar -czvf /media/usb-sdb1-1-7-1/opt.tar.gz /opt/
Use tar -xzvf file.tar.gz "/media/usb-sdb1-1-7-1/" to extract the archive.
You don't need to install a tar.gz it is a compressed file (like a .zip). To extract the file from a terminal, download it (in this example it will just be in your /home folder), and run tar xvf Opera_Mobile_Emulator_12.1_Linux.tar.gz Or you can right click it and choose extract here This will make a folder in /home called ...
If the file is named filename.tar.gz, use the command tar xvzf filename.tar.gz. The x option means extract; the v option means to be verbose in reporting what the tar command is doing; the z option means the files were zipped; the f option means the filename will follow. (If you're new to the terminal, here's a useful tip: start typing the filename and ...
The -f option should be followed by a file or device name. When using tar cvpfz target.tar.gz dir1 you are actually using the so-called "Old Option Style" where When options that need arguments are given together with the command, all the associated arguments follow, in the same order as the options. (tar info page)
Muru really answered the question with the links he posted, but due to his encouragement, I will re-copy one of his links and recap my comments here to hopefully make it easier to see the answer. According to this StackExchange link, the f parameter for the tar command is somewhat special, as it requires an argument (an archive filename) that immediately ...
Your command came close: ssh root@ip "tar xzf - -C /home/minecraft/multicraft/servers/server4" | tar zcf - * But you forgot to switch extraction and creation - now the first command is extracting (from nothing, presumably) and the second command is creation. Try: ssh root@ip "tar zc -C /home/minecraft/multicraft/servers/server4 ." | tar zxv
I'm not sure why you're doing this like you are as it seems overly complex since there are specialized tools to do this. Maybe consider using rsync or scp? rsync --progress -rvz root@ip:/home/minecraft/multicraft/servers/server2 . Used -r for recursive, -z for compression.
Top 50 recent answers are included