11/8/2023 0 Comments List gpus linux ls grep![]() ![]() Note: Here, it’s not possible to give examples of all available options, this guide is only to show how lsof command can be used. The below command will kill all the processes of the tecmint user. Sometimes you may have to kill all the processes for a specific user. The below example only shows whose PID is 1. Master 1551 root 12u IPv4 12896 0t0 TCP localhost:smtp (LISTEN) # lsof -iĬupsd 1346 root 6u IPv6 12112 0t0 TCP localhost:ipp (LISTEN) The following command with option ‘-i’ shows the list of all network connections ‘ LISTENING & ESTABLISHED’. The below example shows user tecmint is using commands like ping and /etc directory. Find Out who’s Looking What Files and Commands? Rpc.statd 1277 rpcuser 5r IPv4 11836 0t0 UDP *:soap-beep You can exclude a particular user using ‘^’ with the command as shown above. Master 1551 root 13u IPv6 12898 0t0 TCP localhost:smtp (LISTEN) To list all the running process of open files of TCP Port ranges from 1-1024. List Open Files of TCP Port Ranges 1-1024 ![]() Rpcbind 1203 rpc 11u IPv6 11336 0t0 TCP *:sunrpc (LISTEN) Rpcbind 1203 rpc 9u IPv6 11333 0t0 UDP *:sunrpc Rpcbind 1203 rpc 6u IPv4 11326 0t0 UDP *:sunrpc In below example shows only IPv4 and IPv6 network files open with separate commands. The below example will list all the running processes of port 22. To find out all the running Linux processes of a specific port, just use the following command with option -i. The below command will display the list of all opened files of user tecmint. However, we’ll review FD & TYPE columns more precisely.įD – stands for a File descriptor and may see some of the values as:Īlso in FD column numbers like 1u is actual file descriptor and followed by u, r, w of its mode as: Sections and their values are self-explanatory. # lsofĬOMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME In the below example, it will show a long listing of open files some of them are extracted for better understanding which displays the columns like Command, PID, USER, FD, TYPE, etc.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |