0

Is their any specific command to count of open files (nofile) by a user in linux?

thanuja
  • 546
  • 1
  • 8
  • 22

1 Answers1

1
lsof -u root | awk '{print $NF}' | sort | wc -l
  • You can drop the grep by using `lsof -u root`, and since you're only outputting a count (and not making it unique) the awk and sort are also unneeded. – Hasturkun Aug 16 '17 at 14:18