每个程序员都逃离不了写一篇这种文章的命运。。
scp命令
scp可以在两个Linux主机之间复制文件。
$> scp [option] [[user@]host1:]file_source [[user@]host2:]file_target
例如:
$> scp pyyaoer@8.8.8.8:~/test.tar /Users/pyyaoer/Downloads
grep命令
在FILE中寻找PATTERN。
$> grep [option] PATTERN [FILE]
例如:
$> grep -i 'hello' menu.h main.c
一些常用的选项
- -i 不区分大小写
- -G Basic Regexes
- -P Perl Regexes
- -w 匹配整个单词
- -x 匹配整行
man命令
查询帮助文档。
$> man man
$> man 8 intro
man分为九个部分:
- general commands (tools and utilities), see intro(1)
- system calls and error numbers, see intro(2)
- C libraries, see intro(3)
- special files and hardware support, see intro(4)
- file formats, see intro(5)
- games, see intro(6)
- miscellaneous information pages, see intro(7)
- system maintenance and operation commands, see intro(8)
- kernel internals, see intro(9)