“常用命令”的版本间差异

来自Shiyin's note
跳到导航 跳到搜索
无编辑摘要
无编辑摘要
第15行: 第15行:
*cat file1 file2 > file3
*cat file1 file2 > file3
:paste file2 to the end of file1 and write to file3
:paste file2 to the end of file1 and write to file3

[[cat and paste ]]


[[find]]
[[find]]

2013年4月18日 (四) 06:29的版本

umask

umask是对权限的过滤器,因此它的工作方式和chmod恰好相反。全部权限等价与777(rwxrwxrwx),umask值0222(-w--w--w-)则代表权限555(r-xr-xr-x)

dd

cat

  • cat file1 file2 | sort | uniq
取出两个文件的并集(重复的行只保留一份)
  • cat file1 file2 | sort | uniq -d
取出两个文件的交集(只留下同时存在于两个文件中的文件)
  • cat file1 file2 | sort | uniq -u
删除交集,留下其他的行
  • cat file1 file2 > file3
paste file2 to the end of file1 and write to file3

find

awk

tr

sed