You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

572 B

+++ title = "一些linux命令" date = 2023-01-06 [taxonomies] tags=["linux"] +++

带进度的wc -l

awk 'BEGIN {T=0} (T!=systime()) { printf "%s %s\n",NR,$0 ; T=systime()} END { print NR}'

使用

cat file |awk 'BEGIN {T=0} (T!=systime()) { printf "%s %s\n",NR,$0 ; T=systime()} END { print NR}'

losf 查找删除文件

lsof |grep delete | sort -nrk 7| more

python 内存监测

pip install memray
memray run --live -m module.file

python cpu监测

pip install py-spy
py-spy top --pid ${pid}