Skip to main content

Posts

Showing posts with the label tar

tar gz tgz and tar bz2

tar gz tgz and tar bz2 On linux distributions we commonly see files named tar, tgz, tar.gz and tar.bz2. This note tries to explain common operations on such files. ta r tar is used to create a Tape ARchive. ( tar is from the old unix era) The resulting file is known as a tarball. A tar ball concatenates files to a a sin get the files out of a tarball, you can extract a tarball using tar -xvf something.tar To create a tar archive , the following command can be used. tar -c /home/mydir > mydir.tar tgz and tar.gz If the tarball has also been gzipped (compressed), the file will be named tar.gz or tgz .You can use the following command to extract it. tar -xvfz something.tar.gz If you want to create a tgz as below. tar czvf myfolder.tar.gz myfolder/ tar.bz2 A tar.bz2 uses bzip2 compression on a tarball. Generally the size will be less that a tar.gz file .If you have a .tar.bz2 file , issue this command: ( You need bzip2 installed) tar -xvjf file-1.0.tar.bz2 If you want to creat...

tar archive and compressing files

tar archive and compressing files Pranaam to all bhai ji _/_ Today we are going to discuss about tar archive and compression method for creating compressed files in linux. Tar command is use to generate an archive of folders/files , it doesnt compress the size. where as , for compression we will use gzip or bzip. in this tutorial we will learn, how to --create tar archives (gzip and bzip compression integration). --extract tar archive or a single file/directory. --listing tar archive content. ok now lets start :) Creating tar archive using tar command  :- put your files in a folder and then run this command tar  -cf  tar_archive_name.tar   file_name/folder_in_which_we_placed files here tar is command c and f are options for tar commands which is telling tar command that , create(c) a tar file(f) whose name is  tar_archive_name.tar   and folder , whose tar archive we have to create is  folder_in_which_we_placed files . remember , use option f in the las...

tar Archives cheatsheet

tar Archives cheatsheet Create archive: tar -czvf compressed_file.tar.gz original_file.sql Extract files: tar -xzvf compressed_file.tar.gz download  file  now