• Linux Command : grep & sed

     · Grape

    如何利用grep和sed实现搜索和替换

    grep -Erl "M\\('local" .|xargs sed -Ei "" "s/M\\('local/M\\('remote/g"
    
    grep -Erl "http://loca" .|xargs sed -Ei "" "s/http:\/\/local/http:\/\/remote/g"
    

    grep

    • -E 将样式为延伸的普通表示法来使用
    • -r 此 …
  • Linux常用命令工具使用笔记

     · 3 min read  · Grape

    find

    在当前目录下查找某个文件:

    find -name "lib*.a"
    

    rsync

    Linux 下合并两个目录,软连接也一起同步。

    rsync -K -a 源目录  被覆盖目录
    

    比如:

    rsync -K -a …
  • Linux Process

     · Grape

    概念

    程序是一系列指令的集合,通常存为可执行文件。进程是程序的执行过程。

    进程属性

    使用ps可以查看系统正在运行的进程。 ps --help显示该命令的用法。

    ps -e -o USER,PID,PPID,GID,NAME
    USER …