Chinaunix首页 | 论坛 | 博客
  • 博客访问: 284532
  • 博文数量: 82
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 874
  • 用 户 组: 普通用户
  • 注册时间: 2015-03-21 09:58
个人简介

traveling in cumputer science!!

文章分类

全部博文(82)

文章存档

2016年(13)

2015年(69)

我的朋友

分类: LINUX

2015-10-14 16:13:06

1.find the install path of some software
    like python:   

点击(此处)折叠或打开

  1. dpkg -L python
    or the start path:

点击(此处)折叠或打开

  1. which python
  2. /usr/bin/python    
    or want to display some system environment variable

点击(此处)折叠或打开

  1. warrior@warrior:~$ echo $PATH
  2. /usr/local/sbin:/usr/local/bin:

2.manage .deb package in ubuntu 
    install a source package :

点击(此处)折叠或打开

  1. warrior@warrior:~/Downloads$ sudo dpkg -i xpdf_3.03-16+experimental2_amd64.deb
  2. [sudo] password for warrior:
  3. Selecting previously unselected package xpdf.
  4. (Reading database ... 285114 files and directories currently installed.)
  5. Preparing to unpack xpdf_3.03-16+experimental2_amd64.deb ...
  6. Unpacking xpdf (3.03-16+experimental2) ...
  7. Setting up xpdf (3.03-16+experimental2) ...
  8. Processing triggers for mime-support (3.54ubuntu1.1) ...
  9. Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
  10. Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
  11. Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
  12. Processing triggers for bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ...
  13. Rebuilding /usr/share/applications/bamf-2.index...
If dpkg reports an error due to dependency problems, you can run sudo apt-get install -f to download the missing dependencies and configure everything.
    
    To remove a Debian (Ubuntu) package (.deb):

点击(此处)折叠或打开

  1. sudo dpkg -r packagename
    To Reconfigure/Repair an installed Debian (Ubuntu) package (.deb):

点击(此处)折叠或打开

  1. sudo dpkg-reconfigure packagename
for detial U can visit:  

3.some package command 
    <1> zip
    我们可以使用下列的命令压缩一个目录:    

点击(此处)折叠或打开

  1. zip -r archive_name.zip directory_to_compress

    下面是如果解压一个zip文档:

点击(此处)折叠或打开

  1. unzip archive_name.zip
    <2> tar
    打包一个目录:

点击(此处)折叠或打开

  1. tar -cvf archive_name.tar directory_to_compress

     解包:  

点击(此处)折叠或打开

  1. tar -xvf archive_name.tar.gz

    也可以用这个命令来设置解包的路径    

点击(此处)折叠或打开

  1. tar -xvf archive_name.tar -C /tmp/extract_here/
    <3> tar.gz
    压缩一个目录:

点击(此处)折叠或打开

  1. tar -zcvf archive_name.tar.gz directory_to_compress

    解压缩:

点击(此处)折叠或打开

  1. tar -zxvf archive_name.tar.gz
    <4> tar.bz2

    使用tar.bz2进行压缩。 

点击(此处)折叠或打开

  1. tar -jcvf archive_name.tar.bz2 directory_to_compress

    解包命令:    

点击(此处)折叠或打开

  1. tar -jxvf archive_name.tar.bz2











阅读(1030) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~