Count open file descriptors

Count open file descriptors of a running process.

cat /proc/$(pgrep myapp)/fd | wc -l

tool
linux133 commands
tags
linuxprocessfdproc

More linux commands

  • getenforce

    Show the current SELinux mode: Enforcing, Permissive or Disabled.

  • ls /etc/cron.* /var/spool/cron/crontabs/

    List cron files in the system directories and user crontabs.

  • printenv | sort

    Show all environment variables in alphabetical order.

  • iostat -xz 1

    Show extended disk I/O stats, updated every second.

  • pstree -p

    Show the process hierarchy with PIDs.

all 133 linux commands