我试图通过用户“apache”找到一些打开的文件描述符。我想排除ls: /proc/PID/fd: No such file or directory
但 GREP 排除不起作用:
# for pid in $(lsof -u apache | awk '{ print $2 }' | uniq); do ls -1 /proc/$pid/fd | grep -v "No"; done | wc -l
ls: /proc/PID/fd: No such file or directory
1944