Skip to content

tail 实时查看

动态实时查看日志

tail -f test.log

如果想在日志中出现 Failed 等信息时立刻停止 tail 监控,可以通过如下命令来实现:

tail -f test.log | sed '/Failed/ q'

查看自己的公网IP

curl ip.sb

文件大小

du -h --max-depth=1 | grep G | sort -n

查看一级目录大小

du -hd 1

显示文件大小单位, 并按大小排序

ls -alhS