October 31, 2019

more than 10 ways to use tar

To use tar for creating a tar.gz file and have all user rights remained correct so you can untar it on target follow this:

SSH to you server and and give the next command to create a tar.gz file

cd /path/to/destination/folder
tar xpvzf name_here.tar.gz /path/to/tar/folder

 

Now take a pendrive, ftp or so and go to the tar.gz file and copy it over to target

cd /path/to/destination/folder
tar xpvzf /destination/folder name_here.tar.gz

Ready. All rights, groups and users intact

Share

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *