/tmp/thirdfile $ exec 4>/tmp/fourthfi...">All geek questions in one placeHow to see file descriptors, for example, using "lsof -l"?I executed the commands ( source ):$ exec 3>/tmp/thirdfile $ exec 4>/tmp/fourthfile $ echo drib >&3 $ echo drab >&4 $ echo another drib >&3 $ echo another drab >&4 $ exec 3>&- $ exec 4>&- How can I see file descriptors, something like lsof -l?+3unix file-descriptor file-handlingLéo Léopold Hertz 준영 Aug 27 '09 at 4:39source share2 answersI do not understand why not just use lsof:lsof -p $$ $$ is a shell variable that contains the shell process identifierYou can also restrict only file descriptors, for example:lsof -a -d0-65535 -p $$ +7derobert Aug 27 '09 at 4:43source shareOn Linux, you can do something like ls -l /proc/$$/fdthat that will show you which file descriptors are open in your shell., $$ , ( , , ).+4Chris Jester-Young 27 . '09 4:42Source: https://habr.com/ru/post/1716171/More articles:How to extract all integer values from a string using regular expression? - phpMembership Password Asp.Net Reset Without Symbols - sqlmembershipproviderPassing PHP array in SOAP call - arraysHow to call a method that would be called if the delegate was not there - objective-chttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1716170/iphone-which-view-controller-methods-to-use&usg=ALkJrhh-TddsNAxl4adjSwPzIw3w_dGkTAExplicit CALayer animation not working properly - core-animationRegular expression to extract part of a URL - regexAvoid creating the same object twice when updating in JSF - jsfCreating browser extensions - browserHow to prefix message length in TCP / IP - c ++All Articles
I executed the commands ( source ):
$ exec 3>/tmp/thirdfile $ exec 4>/tmp/fourthfile $ echo drib >&3 $ echo drab >&4 $ echo another drib >&3 $ echo another drab >&4 $ exec 3>&- $ exec 4>&-
How can I see file descriptors, something like lsof -l?
lsof -l
I do not understand why not just use lsof:
lsof -p $$
$$ is a shell variable that contains the shell process identifier
$$
You can also restrict only file descriptors, for example:
lsof -a -d0-65535 -p $$
On Linux, you can do something like ls -l /proc/$$/fdthat that will show you which file descriptors are open in your shell.
ls -l /proc/$$/fd
, $$ , ( , , ).
Source: https://habr.com/ru/post/1716171/More articles:How to extract all integer values from a string using regular expression? - phpMembership Password Asp.Net Reset Without Symbols - sqlmembershipproviderPassing PHP array in SOAP call - arraysHow to call a method that would be called if the delegate was not there - objective-chttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1716170/iphone-which-view-controller-methods-to-use&usg=ALkJrhh-TddsNAxl4adjSwPzIw3w_dGkTAExplicit CALayer animation not working properly - core-animationRegular expression to extract part of a URL - regexAvoid creating the same object twice when updating in JSF - jsfCreating browser extensions - browserHow to prefix message length in TCP / IP - c ++All Articles