zoukankan      html  css  js  c++  java
  • ubuntu how to locate what you want (the path, the file etc.)

    part 1  find the path

    the first 5 ways are excuted with terminals, the 6-th is gui, the 7-th varies.

    Based on the pipiline tech, the 'grep' can be combined with all the following ways.

    1 dpkg show the installed packages (only packages by the synaptic manager usually .deb type)

     first, we should know the organized structure of linux distributions. In Linux distributions, a “package” refers to a compressed file archive containing all of the files that come with a particular application. The files are usually stored in the package according to their relative installation paths on your system. Most packages also contain installation instructions for the OS, as well as a list of any other packages that are dependencies (prerequisites required for installation.

    Common types of Linux packages include .deb, .rpm, and .tgz. Since Linux packages do not usually contain the dependencies necessary to install them, many Linux distributions use package managers that automatically read dependencies files and download the packages needed before proceeding with the installation. Some examples of package managers are APT, YUM, and Pacman.

    ex 

    dpkg -s dpkg | grep Status
    Status: install ok installed

    more detail:http://www.cyberciti.biz/howto/question/linux/dpkg-cheat-sheet.php

    2 whereis: locate the binary, source, and manual page files for a command

    ex whereis *python*

    3 which :locate a command; returns the pathnames of the files (or links) which would be executed in the current environment,

    4 locate 

    Locate is used more like a keyword-based search function.

    ex locate java ;  the returned result is large

    5 find : search for files in a directory hierarchy

    ex :  find / -xdev -type f -a -name 'java*'

    compared with 4, this way has connection with the directory 

    6 gui such as

     6.1 places->search for files->input the keywords and set the folder

    6.2 the synaptic manager search

    7 other tools such as 

    xfce4-appfinder

    Beagle

    part 2 find special text string with some known information

    1 grep : print lines matching a pattern

    http://vim.wikia.com/wiki/Find_in_files_within_Vim

    2 ctags+cscope

    3 global

    etc....

    here thanks to Mr. Wu 





  • 相关阅读:
    Character Encoding题解(容斥)
    P1445 [Violet]樱花 题解(推式子)
    F. Stone 题解(对称博弈)
    M. 810975 题解(容斥)
    P1365 WJMZBMR打osu! / Easy 题解(期望dp)
    icpc济南
    C#创建windows服务并定时执行
    批处理 windows 服务的安装与卸载
    前台单击文件,jQuery删除后台相应真实的文件
    Jquery直接调用后台方法(WebMethod框架的使用)
  • 原文地址:https://www.cnblogs.com/18fanna/p/3102663.html
Copyright © 2011-2022 走看看