I would like to obtain different result with lsof, I mean just want to show some columns, is it possible?
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
init 1 root cwd DIR 8,1 4096 2 /
init 1 root rtd DIR 8,1 4096 2 /
init 1 root txt REG 8,1 36992 139325 /sbin/init
init 1 root mem REG 8,1 14696 190970 /lib/libdl-2.11.3.so
init 1 root mem REG 8,1 1437064 190958 /lib/libc-2.11.3.so
Use awk:
this will print only column 1 and 2