How To Tar And Untar Files In Linux
Posted On Sun Dec 28, 2008 By wallpaperama In Linux Forums And Topics Discussions For Wallpaper Websites Running On Linux Servers Forums
How To Tar
compressing: www/ directory:
tar -pczf filename.tar.gz www/
How To UnTar
untaring filename.tar.gz
tar xvfz filename.tar.gz
Thats it, that the most simple way i can show you.
hope this helps
NAME
tar - The GNU version of the tar archiving utility
SYNOPSIS
tar <operation> [options]
Operations:
[-]A --catenate --concatenate
[-]c --create
[-]d --diff --compare
[-]r --append
[-]t --list
[-]u --update
[-]x --extract --get
--delete
Common Options:
-C, --directory DIR
-f, --file F
-j, --bzip2
-p, --preserve-permissions
-v, --verbose
-z, --gzip
DESCRIPTION
This manual page documents the GNU version of tar, an archiving program designed to
store and extract files from an archive file known as a tarfile. A tarfile may be
made on a tape drive, however, it is also common to write a tarfile to a normal
file. The first argument to tar must be one of the options Acdrtux, followed by any
optional functions. The final arguments to tar are the names of the files or direc-
tories which should be archived. The use of a directory name always implies that
the subdirectories below should be included in the archive.
EXAMPLES
tar -xvf foo.tar
verbosely extract foo.tar
tar -xzf foo.tar.gz
extract gzipped foo.tar.gz
tar -cjf foo.tar.bz2 bar/
create bzipped tar archive of the directory bar called foo.tar.bz2
tar -xjf foo.tar.bz2 -C bar/
extract bzipped foo.tar.bz2 after changing directory to bar
tar -xzf foo.tar.gz blah.txt
extract the file blah.txt from foo.tar.gz
FUNCTION LETTERS
One of the following options must be used:
-A, --catenate, --concatenate
append tar files to an archive
-c, --create
create a new archive
-d, --diff, --compare
find differences between archive and file system
-r, --append
append files to the end of an archive
-t, --list
list the contents of an archive
-u, --update
only append files that are newer than the existing in archive
-x, --extract, --get
extract files from an archive
--delete
delete from the archive (not for use on mag tapes!)
COMMON OPTIONS
-C, --directory DIR
change to directory DIR
-f, --file [HOSTNAME:]F
use archive file or device F (default "-", meaning stdin/stdout)
-j, --bzip2
filter archive through bzip2, use to decompress .bz2 files
-p, --preserve-permissions
extract all protection information
-v, --verbose
verbosely list files processed
-z, --gzip, --ungzip
filter the archive through gzip
ALL OPTIONS
--atime-preserve
don't change access times on dumped files
-b, --blocking-factor N
block size of Nx512 bytes (default N=20)
-B, --read-full-blocks
reblock as we read (for reading 4.2BSD pipes)
--backup BACKUP-TYPE
backup files instead of deleting them using BACKUP-TYPE simple or numbered
--block-compress
block the output of compression program for tapes
-C, --directory DIR
change to directory DIR
--check-links
warn if number of hard links to the file on the filesystem mismatch the num-
ber of links recorded in the archive
--checkpoint
print directory names while reading the archive
-f, --file [HOSTNAME:]F
use archive file or device F (default "-", meaning stdin/stdout)
-F, --info-script F --new-volume-script F
run script at end of each tape (implies --multi-volume)
japdatsme Sun Mar 11, 2012
for the first tim..how shd be do..'
pls help
pls help
Iban Mon Feb 20, 2012
"Thats it, that the most simple way i can show you.
hope this helps"
Yes, it helped. It's just what I needed. Thanks.
hope this helps"
Yes, it helped. It's just what I needed. Thanks.
wallpaperama Thu Apr 09, 2009
this is how you would tar into a directory:
tar xvfz images.tar.gz -c /root/test_tar/files/
lets say i am in /root sending this command, then it will untar the files into this directory: /root/test_tar/files/
tar xvfz images.tar.gz -c /root/test_tar/files/
lets say i am in /root sending this command, then it will untar the files into this directory: /root/test_tar/files/
Related Content
Information
Forums »
Linux Forums And Topics Discussions For Wallpaper Websites Running On Linux Servers »
How To Tar And Untar Files In Linux
Linux Forums And Topics Discussions For Wallpaper Websites Running On Linux Servers »
How To Tar And Untar Files In Linux
Title: How To Tar And Untar Files In Linux
Description: How To Tar And Untar Files In Linux
Tags: how ,to ,tar ,and ,untar ,files ,in ,linux
Info: This Post Has Been Viewed 0 Times Since
Date: Sun Dec 28, 2008
Author wallpaperama Received 3 Replies #3049
Date: Sun Dec 28, 2008
Author wallpaperama Received 3 Replies #3049
Share
URL: 

Embed: 

To embed this topic, just copy the code from the "Embed" box. Once you've copied the code, just paste it into your website or blog to embed it
BBCODE:: 

BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums
wallpaperama | Wallpapers | Forums | Terms Of Service
copyright © 2013 wallpaperama - All Rights Reserved - Last Updated Mon May 06, 2013 (-8 GMT)
Powered by: Webune Forums V5
copyright © 2013 wallpaperama - All Rights Reserved - Last Updated Mon May 06, 2013 (-8 GMT)
Powered by: Webune Forums V5