This is a very simple, quick and easy way of compression (zipping) and decompression (extracting) files using command line. First of all open terminal and go to the file folder. Example: # cd /home/user (go to the directory file was downloaded)
# ls (to make sure package is there) To combine multiple files and/or directories into a single file, use the following command:
- tar -cvf your_file.tar inputfile1 inputfile2
- tar -xvf your_file.tar
Extracting gz and bz2
- bz2 files: tar -jxvf nome-do-arquivo.tar.bz2
-
gz files: tar -zxvf nome-do-arquivo.tar.gz
*v is for verbose mode
- unzip <file_name.zip>
- zip <new_zip_file_name> <file_to_zip>
The installation procedure for software that comes in tar.gz and tar.bz2 packages isn’t always the same, but usually it’s like this:
# tar xvzf package.tar.gz (or tar xvjf package.tar.bz2)
# cd package
# ./configure
# make
# make install
- if you got any doubts just ask
No comments:
Post a Comment