zoukankan      html  css  js  c++  java
  • 【搜】linux常用命令及应用实例

    帮助命令

    man 

    info

    whatis

        makewhatis

    apropos  == man-k

    help 查看shell内置命令

    文件命令

    cd              进入目录

    ls               列出文件

    ll                列出文件

    cat            全部显示文件内容

    more        分页显示文件内容

    head -5    列出文件头部几行内容 

    tail    -5     列出文件最后几行内容

    touch       创建空文件

    mkdir   -p 创建文件夹

    rm -rf      删除文件强制递归

    权限

    chown     改变所有者

    chmod    改变权限

    chgrp      改变所属用户组

    umask -S 缺省创建文件掩码值 755-掩码值

    文件搜索命令

    which   命令名字     查找命令所在文件夹

    ==  whereis

    find 搜索路径 -name 关键字   查找目录或文件

    locate 从文件数据库里面查找

        updatedb 更新数据库

    grep 关键字 目录[文件]  搜索文件内容


    应用实例:

    find ./ -name *.php -exec grep "123.txt" {} -l  ;  在特定后缀的文件中查找命令

  • 相关阅读:
    HDOJ 4747 Mex
    HDU 1203 I NEED A OFFER!
    HDU 2616 Kill the monster
    HDU 3496 Watch The Movie
    Codeforces 347A A. Difference Row
    Codeforces 347B B. Fixed Points
    Codeforces 372B B. Hungry Sequence
    HDU 1476 Sudoku Killer
    HDU 1987 How many ways
    HDU 2564 词组缩写
  • 原文地址:https://www.cnblogs.com/longhua828/p/linux_common_command_and_exp.html
Copyright © 2011-2022 走看看