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 





  • 相关阅读:
    vux 使用 loading 组件
    vux 使用 font-awesome
    批处理常用符号详解
    jQuery.parseJSON vs JSON.parse
    MVC view操作(Razor语法)
    原生JavaScript技巧大收集
    .Net实现表达式计算(公式) 表达式字符串
    .Net文档下载
    MVC下载文档
    .Net实现Word文档及导出
  • 原文地址:https://www.cnblogs.com/18fanna/p/3102663.html
Copyright © 2011-2022 走看看