UNIX tar command help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • megri
    Administrator
    • Mar 2004
    • 802

    UNIX tar command help

    If you are untarring them on the server you may use the commands below:

    tar zxvf abc.tar.gz
    Parveen K - Forum Administrator
    SEO India - TalkingCity Forum Rules - Webmaster Forum
    Please Do Not Spam Our Forum
  • Guest

    #2
    The "tar" command stands for tape archive.
    This command is used to create new archives, list files in existing archives, and extract files from archives.

    The tar command can be used to write archives directly to tape devices, or you can use it to create archive files on disk. In many cases, tar archives are created on disk so it's easier to transport them across networks, such as the Internet.

    Note - the tar command does not compress files. Use the compress command to compress the tar archive after you've created it.

    Examples:

    tar cvf /dev/rct0 /home
    This command writes a tar archive to the tape device /dev/rct0. It copies the files in the /home directory, and all subdirectories of /home to the tape device.


    tar cvf /dev/fd0 /home/fred

    This command writes a tar archive to the diskette device /dev/fd0. It copies the files in the /home/fred directory, and all subdirectories of /home/fred to the diskette.


    tar cvf /tmp/home.tar /home

    This command creates a tar archive named /tmp/home.tar. The tar command copies the files in the /home directory, and all subdirectories of /home.


    tar cvf /tmp/home.tar /home
    compress /tmp/home.tar

    This example shows two commands issued in sequence. The first command creates a tar archive named /tmp/home.tar. The second command compresses the tar archive, and replaces it with a new compressed tar archive, named /tmp/home.tar.Z. See the compress command for more details.

    Comment

    Working...
    😀
    😂
    🥰
    😘
    🤢
    😎
    😞
    😡
    👍
    👎