0% found this document useful (0 votes)
1 views

tar linux

Uploaded by

jpgameryt2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

tar linux

Uploaded by

jpgameryt2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

** File compression : managing &

transferring data on a linux system.

Tar command : tape archive that allow


users to create compressed & archive
les .

Extension : file.tar

Syntax :

Tar [options] [ archive le name ]


[ le/dir location ]

Options : optional ags or settings that


modify the behaviour of the tar
command

Archive le : the name of the archive


le you are creating or working with

File / dir : you want to include in the


archive
fi
fi
fi
fi
fl
fi
**** Options

-c : create an archive by bundling les


& dir together

-x : extracts le & dir from an existing


archive

-f : speci es the lename of the


archive to be created or extracted

-t : display or list the file

-u : add some new le/dir /archive to an


existing archive

-v : display verbose information,


detailed output

-A : add multiple archive into a single


archive
fi
fi
fi
fi
fi
-z : uses gzip compression when
creating a tar le

Example :

1. Creating a uncompressed tar archive

Tar -cvf file.tar dirname

2. Extracting uncompressed tar

tar -xvf file.tar

3. Display the data inside a tar

Tar -tvf file.tar

4. Creating a compressed tar

tar -cvzf file.tar.gz filename


fi
5. Extracting a compressed tar

tar -xvzf file.tar.gz

6.

You might also like