Picture from flickr by Windwirral
First you want to create and add files to the archive. Go to the target directory and enter individual filenames and directories you want to have included.
tar -vzcf mystuff.tar.gz file1.txt file2.doc mypictures/
Now you can test if that worked by listing the files in the archive.
tar -tvf mystuff.tar.gz
When you want to extract the files, go to the folder where you want to extract them, in this case 'targetfolder'.
cd targetfolder
tar -vxf mystuff.tar.gz
No comments:
Post a Comment