C
CHarneyCHRIS
The followings are different types of compression that you might see under
linux.
1. .gz
2. .tar
3. .Z
4. .cpio
5. .zip
6. .bz2
7. .rar (need unrar for Linux)
8. .rpm (will be covered later)
Anything else?
II. How to truly find out which archive it is?
==============================================
Simply type: file filename.extension at the console then it'll tell you which
archive format the file has.
III. *Unzip* them
==========================
1. For .gz archive file, usually ended with .gz, so the filename should be like
this: filename.gz.
to unzip these types of file, simply type: gunzip filename.gz
2. For .tar archive file, usually ended with .tar, so the file name should be
like: filename.tar.
To untar these types of file, simply type: tar -xfv filename.tar
NOTE: the -v option is for verbose and it prints all the filenames being
extracted. It is not recommended
that you use this option for large files because it will somewhat slow down
your process by both displaying
the filenames and decompress at the same time. So if you have a big file, just
type: tar -xf filename.tar.
3. For .tar.gz file, type: tar -xfvz filename.tar.gz
4. For .Z file, type: uncompress .Z
5. For .zip file, you need to get the zip utility for linux and then type:
unzip filename.zip
6. For .bz2, type bzip2 -d filename.bz2, or bunzip2 filename.bz2
7. for .rar, first get the rar utility for Linux, then type: unrar filename.rar
8. For .rpm, this is just like a setup.exe in Windows, where all files are
being precompiled and ready to install
on you machine. The followings are basic operation for a rpm file.
a. Install: rpm -ivh filename.rpm
b. Upgrade: rpm -Uvh filename.rpm
c. Uninstall: rpm -e packagename
d. Query a package name when you know the package name: rpm -q apache
If you don't know the package name and wanted to see what packages include that
name do:
rpm -qa|grep somethinghere, for instance I would like to find out about apache
I'll do
rpm -qa|grep apache
e. To check see which package a file belongs to do: rpm -qif
/location/of/the/file
f. To see the content of the rpm: rpm -qlp filename.rpm
IV. Installing Source-code software
==========================================
1. Get the source code package, often ended in .tar.gz.
2. Uncompress them: tar -xfvz filename.tar.gz
3. It'll usually create a directory like the package name.
4. Type: cd packagename
5. Type: ./configure or ./configure --help for help
6. Type: make (if not error occured in configure)
7. Type: make install (with no error occured in make)
8. If no options specified in ./configure, the default installation directory
is /usr/local. Therefore, just
change directory to /usr/local/newpackageinstall
V. The End
linux.
1. .gz
2. .tar
3. .Z
4. .cpio
5. .zip
6. .bz2
7. .rar (need unrar for Linux)
8. .rpm (will be covered later)
Anything else?
II. How to truly find out which archive it is?
==============================================
Simply type: file filename.extension at the console then it'll tell you which
archive format the file has.
III. *Unzip* them
==========================
1. For .gz archive file, usually ended with .gz, so the filename should be like
this: filename.gz.
to unzip these types of file, simply type: gunzip filename.gz
2. For .tar archive file, usually ended with .tar, so the file name should be
like: filename.tar.
To untar these types of file, simply type: tar -xfv filename.tar
NOTE: the -v option is for verbose and it prints all the filenames being
extracted. It is not recommended
that you use this option for large files because it will somewhat slow down
your process by both displaying
the filenames and decompress at the same time. So if you have a big file, just
type: tar -xf filename.tar.
3. For .tar.gz file, type: tar -xfvz filename.tar.gz
4. For .Z file, type: uncompress .Z
5. For .zip file, you need to get the zip utility for linux and then type:
unzip filename.zip
6. For .bz2, type bzip2 -d filename.bz2, or bunzip2 filename.bz2
7. for .rar, first get the rar utility for Linux, then type: unrar filename.rar
8. For .rpm, this is just like a setup.exe in Windows, where all files are
being precompiled and ready to install
on you machine. The followings are basic operation for a rpm file.
a. Install: rpm -ivh filename.rpm
b. Upgrade: rpm -Uvh filename.rpm
c. Uninstall: rpm -e packagename
d. Query a package name when you know the package name: rpm -q apache
If you don't know the package name and wanted to see what packages include that
name do:
rpm -qa|grep somethinghere, for instance I would like to find out about apache
I'll do
rpm -qa|grep apache
e. To check see which package a file belongs to do: rpm -qif
/location/of/the/file
f. To see the content of the rpm: rpm -qlp filename.rpm
IV. Installing Source-code software
==========================================
1. Get the source code package, often ended in .tar.gz.
2. Uncompress them: tar -xfvz filename.tar.gz
3. It'll usually create a directory like the package name.
4. Type: cd packagename
5. Type: ./configure or ./configure --help for help
6. Type: make (if not error occured in configure)
7. Type: make install (with no error occured in make)
8. If no options specified in ./configure, the default installation directory
is /usr/local. Therefore, just
change directory to /usr/local/newpackageinstall
V. The End