Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 597 Bytes

COMMAND.md

File metadata and controls

38 lines (28 loc) · 597 Bytes

linux common command study

sed


  • 在文件前添加一行 sed -i 1i\word word 插入文字

grep


  • 在文件中搜索 grep -n "key" file -n 显示行号
  • 正则搜索 grep -n hello.*world.* file -m 3 -m 限制显示数量

rev


rev <file name>rev命令会将你文件中的内容反转输出到命令行

bc


bc命令行计算器

cal


cal 命令行日历

ssh


ssh xxx bash < xxx.sh 远程执行脚本

vim


vim scp://xxx/~/.bashrc vim编辑远程文件

命令行快捷键


CTRL+a 移动光标到行首 CTRL+e 移动光标到行末