Tar, including some example commands.
See
AboutThesePages.
Contents
Examples
Un-tar-ing
tar zxvf file.tar.gz
(or sometimes with the "-")
man page
(on the Internet)
Need a mnemonic for zxvf:
- z = ungzip (or gzip)
- x = extract
- v = verbose
- f = from the man page: "use archive file or device F (default /dev/rmt0)" ??
"zip extract verbose file" ?? or, pronounce it "zevf", or ??
Oops, but the first argument must be one of "Acdrtux", so it might need to be xvfz? -- and I forget when to use the dash and when not to.
or
gunzip -d filename.tar.gz
(note that the above leaves the zip file intact, as opposed to unzip); followed by
tar -xvf filename.tar
Tar-ing
tar cf <archive name> <files to archive>
(sometimes with the "-"?)
(Remember that "*" works as a wildcard in Linux (at least in some cases.)
gzip <archive name>.tar
(The archive name becomes <archive name>.tar.gz.)
<Currently, no significant content below this line.>
Backup and Restore
From a post to
Blt-newuser@basiclinuxPLEASENOSPAM.net
by Kevin Coyner <kevin@rustybear.com> on 25 Oct 2002:
(cd /src/dir; tar cf - . ) | (cd /dst/dir; tar xvfp - )
This works great as it moves a complete directory, dot files and sub-directories and all. Also keeps proper ownership and timestamps.
Notes
Resources
See
ResourceRecommendations. Feel free to add additional resources to these lists, but please follow the guidelines on
ResourceRecommendations including
ResourceRecommendations#Guidelines_for_Rating_Resources.
Recommended
Recommended for Specific Needs
Recommended by Others
No Recommendation
Not Recommended
Contributors
- () RandyKramer - 05 Jul 2002
- <If you edit this page: add your name here; move this to the next line; and include your comment marker (initials), if you have created one, in parenthesis before your WikiName.>
[[Main.RandyKramer#05 Jul 2002][]]
Page Ratings