• 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 





  • 相关阅读:
    130517Dev GridControl建立多行复杂表头(Banded View)时,统计列与对应列无法对齐的解决办法
    C&C++标准库
    Linux操作系统下的多线程编程详细解析
    Ubuntu12.04用户以root身份登录
    ubuntu永久修改主机名
    linux信号 linux signal
    淘宝api 登录验证
    淘宝开店 防骗 易赛加款诈骗|冲q币恶意差评
    面试..
    test
  • 原文地址:https://www.cnblogs.com/18fanna/p/3102663.html
Copyright © 2020-2023  润新知