To tar a list of files/directories, do
tar -tf mytar.r
To delete files from the tar, list the contents, do
To compress the tar, do
To extract files from the tar, do
To simultaneously tar and compress, do
tar -cf mytar.tar file1 file2 dir3 file4
To add more files to this, dotar -rf mytar.tar file5 dir6 dir7
To list the contents of the tar, dotar -tf mytar.r
To delete files from the tar, list the contents, do
tar --delete -f mytar.tar file1 dir2
using the exact path as given in the `list contents' step.To compress the tar, do
gzip -c mytar.tar > mytar.tar.gz
To decompress the file, dogunzip -c mytar.tar.gz > mytar.tar
To extract files from the tar, do
tar -xf mytar.tar file2 dir3
To extract everything, do tar -xf mytar.tar
To simultaneously tar and compress, do
tar -czf mytar.tar.gz file1 dir2 file3
To simultaneously decompress and extract, dotar -xzf mytar.tar.gz
(Note: Additions, using tar -rf, are not allowed for compressed tar files)
No comments:
Post a Comment