LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to find out how many file descriptors I am using? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-find-out-how-many-file-descriptors-i-am-using-4175604409/)

HowieReese 04-22-2017 04:30 PM

How to find out how many file descriptors I am using?
 
Greetings. I learned how to use file descriptors but never seen a way to check how many I am using. Any help is great.

bigrigdriver 04-22-2017 05:50 PM

https://unix.stackexchange.com/quest...g-lsof-command

Jjanel 04-23-2017 04:55 AM

You'll find some interesting 'stuff' from a web-search of: ls /proc/self/fd
(ulimit may also be semi-relevant) wiki here.
Great to see learning; best wishes & welcome to LQ!

HowieReese 04-23-2017 05:24 AM

I got the hint from one of the answers in the link. To see the current file descriptors that I imitated is:

ls -l /proc/PID/fd

To get the current PID of my session on the terminal is simply

echo $$

Thanks bigrigdriver for the link +1


All times are GMT -5. The time now is 12:08 AM.