grep 选项功能-r递归搜索子目录-i忽略大小写-n显示行号-l只显示文件名-v反转匹配(显示不包含的行)-w全词匹配-E使用扩展正则表达式–include指定文件类型 --include=*.{js,py}–exclude排除文件类型 --exclude=*.log–exclude-dir排除目录 --exclude-dir={.git,node_modules}### Markdown表格基本语法 查找当前目录下所有 Python 文件中的 “import” 语句 grep -rn --include=*.py "import" . 查找包含ip的文件 grep -rE "([0-9]{1,3}\.){3}[0-9]{1,3}" /etc/ systemctl 开启服务 sudo systemctl start v2raya.service 停止服务 sudo systemctl stop v2raya.service 设置开机自启动(本身有自启动服务的话) sudo systemctl enable v2raya.service 撤销开机自启动 sudo systemctl disable v2raya sudo systemctl stop v2raya