zoukankan      html  css  js  c++  java
  • Linux 常用命令汇总

    一、打包压缩解压

    ①压缩

    tar -czvf Test.tar.gz ./Test

    tar -cjvf Test.tar.bz2 ./Test

    ②解压

    tar -xzvf Test.tar.gz

    tar -xjvf Test.tar.bz2

    -c, --create: create a new archive

    -z, --gzip: filter the archive through gzip

    -v, --verbose: verbosely list files processed

    -f, --fIle=ARCHIVE: use archive file or defice ARCHIVE

    -j, --bzip2: filter the archive through bzip2

    -x, --extract, --get: extract files from an archive

    二、查找替换

    ①. 查找指定目录下某一文件

    find ./ -name filename

    ②. 查找指定目录下文件中的字符串

    grep -r --color "Str" ./

    ③. 替换指定目录下文件中的字符串

    grep -rl printf ./ | xargs sed -i 's/printf/xxxxxx/g'     --printf -->> xxxxxx

    ④. 严格匹配替换指定目录下文件中的字符串

    grep -rl "printf" ./ | xargs sed -i 's/<printf>/xxxxxx/g'

    grep 选项介绍

    -r, -R, --recursive: Read  all  files  under  each  directory,  recursively

    -l: Suppress  normal  output; instead print the name of each input file from which output would normally have been printed.

    三、混合指令

    ① 远程拷贝
    scp -r root@
    192.168.1.102:/home/lk /root

    ② 内存泄漏检测
    valgrind --tool=memcheck --leak-check=full ./Test


  • 相关阅读:
    MidPayinfoVO
    IPayablebillItf
    预算oracle
    oracle怎么查看表字段的类型
    orcale授权
    ORCAL
    【转】Oracle
    其他网站api
    生成pdf入门
    有关一个java项目到eclipse中运行
  • 原文地址:https://www.cnblogs.com/wulei0630/p/9226657.html
Copyright © 2011-2022 走看看