linux 软件包主要有:
.deb debian的安装格式
.tar/.tar.gz等 unix/linux压缩包,不过.tar只是将多个文件集中起来了,本身没有压缩
.rpm 在红帽系统下可直接安装。
tar的压缩和解压的命令:
压缩:
tar zcvf filename.tar.gz file1 file2 ……
tar zcvf dirname.tar.gz dirname1 dirname2 ……
解压:
tar -zxvf filename(含.tar.gz后缀名)
压缩和解压方法还有:
gzip filename(得到后缀名是.gz)
gunzip filename
edemon@linux:~$ mkdir test edemon@linux:~$ cd test edemon@linux:~/test$ touch t1 t2 t3 edemon@linux:~/test$ tar czvf t.tar.gz t1 t2 t3 t1 t2 t3 edemon@linux:~/test$ ls t1 t2 t3 t.tar.gz edemon@linux:~/test$ cd .. edemon@linux:~$ ls Desktop Downloads Music Public test Documents examples.desktop Pictures Templates Videos edemon@linux:~$ mkdir test2 edemon@linux:~$ tar czvf tdir.tar.gz test test2 test/ test/t1 test/t3 test/t.tar.gz test/t2 test2/ edemon@linux:~$ ls Desktop Downloads Music Public Templates test2 Documents examples.desktop Pictures tdir.tar.gz test Videos edemon@linux:~$ tar -zxvf tdir.tar.gz test/ test/t1 test/t3 test/t.tar.gz test/t2 test2/
edemon@linux:~/Downloads$ tar -zxvf shutter-0.88.tar.gz edemon@linux:~/Downloads$ cd shutter-0.88/bin edemon@linux:~/Downloads/shutter-0.88/bin$ sudo apt-get install shutter
edemon@linux:~$ mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.7.11 MySQL Community Server (GPL) Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> select now(); +---------------------+ | now() | +---------------------+ | 2016-02-11 10:12:13 | +---------------------+ 1 row in set (0.03 sec) mysql>