Unix &&Linux命令
linke_linux
这个作者很懒,什么都没留下…
展开
-
linux 命令之查看最后一次关机时间
last -x|grep shutdown|head -1原创 2018-06-05 17:21:21 · 7659 阅读 · 1 评论 -
linux命令之find查找命令并操作文件
find [path] [-name] [-size] [-type][-mtime][-ctime]。-0 表示如果文件含有空格,也会查找到文件末尾以文件名的\0结束。原创 2018-06-05 17:36:45 · 195 阅读 · 0 评论 -
linux 命令之mount挂载
mount -t nfs 远端 本地dictionaryumount dictionary 卸载时如果显示device is busy则用命令查看fuser -m dictionarykill -9 PID杀掉原创 2018-06-05 17:40:06 · 223 阅读 · 0 评论 -
对 2 >&1的解释
假设运行命令 xxxxxx.sh>output 2>&1 & 1.将标准输出重定向到output 2 : 2 >&1 将标准错误重定向到标出输出,因为标准输出已经重定向到标准输出,因此也就是将标准错误重定向到标准输出。 为什么需要将标准错误重定向到标准输出的原因,那就归结为标准错误没有缓冲区,而stdout有。这就会导致 >outp...原创 2019-08-26 16:55:34 · 227 阅读 · 0 评论 -
tr 命令
1. tr 映射(tr "[a-z]" [A-Z]) echo abc|tr "[a-z]" "[A-Z]" #一对一映射大小写转换 #输出 ABC 2. tr 压缩(tr -s) cat words.txt |tr -s ' ' 2.1 tr 压缩替换 echo abc def |tr -s ' ' '\n' #将多个空格压缩成1个空格,完事后,将空格替换为换行符...原创 2019-09-10 19:09:00 · 339 阅读 · 0 评论