转载:那些你希望在N年前就掌握的命令
原文地址:http://heikezhi.com/2011/11/28/one-command-you-wish-you-knew-years/
使用du命令查看一级子目录存储空间大小
ls | xargs du -sh
cd -
看个例子:
cd /some/complicated/directory
cd ~/foo cp some_file `cd -`
cd ~/foo cp some_file `cd -`
更简单的:
cp some_file ~-
man ascii
以8进制,10进制以及16进制显示ASCII码表
取得运行中进程的输出
~$ touch log
~$ gdb -p 22499
(gdb) p close(1) # This closes the stdout of the running process
(gdb) p open("/home/.../log", 1) # This will open the log-file with O_WRITE (gdb) c
~$ gdb -p 22499
(gdb) p close(1) # This closes the stdout of the running process
(gdb) p open("/home/.../log", 1) # This will open the log-file with O_WRITE (gdb) c
浙公网安备 33010602011771号