-3

On my system:

root@NOTIFICATION:/# lsof | wc -l
24187
root@NOTIFICATION:/# lsof -u tomcat7 | wc -l
224
root@NOTIFICATION:/# lsof | grep tomcat7 | wc -l
20646
terdon
  • 242,166

1 Answers1

4

You have two different selections:

  • lsof -u tomcat7 lists open files belonging to tomcat7, whatever their names.

  • lsof | grep tomcat7 lists open files with tomcat7 in their name ( or as a string in the line, be it user or group) irrespective of their owners.

Archemar
  • 31,554