Commands Line Utilities: Difference between revisions
From mylearnings
Jump to navigationJump to search
Created page with "= Process = * Find PID of a known program. <pre> pidof <application name> </pre> * Find all the direct and indirect child processes of a process. <pre> pstree -p <PID> </pre> * List all the files opened by a process with PID. <pre> lsof -p <PID> </pre> * Find details of a file descriptor corresponding to a PID. <pre> lsof -p <PID> -a -d <FD> </pre> ::- -a => Stands for 'AND' Operation. ::- -d => File descriptor for which we need to find details. * Find Parent (PPID)..." |
No edit summary |
||
Line 24: | Line 24: | ||
* Find Parent (PPID) of a process with PID. | * Find Parent (PPID) of a process with PID. | ||
<pre> | <pre> | ||
= File System = | |||
* Check filesystem type. | |||
<pre> | |||
df -T <Path> | |||
</pre> | |||
* See details about a mount. | |||
<pre> | |||
findmnt -T <Path> | |||
</pre> | |||
ps -o ppid= -o comm= -p <PID> | ps -o ppid= -o comm= -p <PID> |
Revision as of 13:12, 16 June 2025
Process
- Find PID of a known program.
pidof <application name>
- Find all the direct and indirect child processes of a process.
pstree -p <PID>
- List all the files opened by a process with PID.
lsof -p <PID>
- Find details of a file descriptor corresponding to a PID.
lsof -p <PID> -a -d <FD>
- - -a => Stands for 'AND' Operation.
- - -d => File descriptor for which we need to find details.
- Find Parent (PPID) of a process with PID.
= File System = * Check filesystem type. <pre> df -T <Path>
- See details about a mount.
findmnt -T <Path>
ps -o ppid= -o comm= -p <PID>