1. List all Open Files with lsof Command
Sections and it’s values are self-explanatory. However, we’ll review FD & TYPE columns more precisely.
FD – stands for File descriptor and may seen some of the values as:
- cwd current working directory
- rtd root directory
- txt program text (code and data)
- mem memory-mapped file
Also in FD column numbers like 1u is actual file descriptor and followed by u,r,w of it’s mode as:
- r for read access.
- w for write access.
- u for read and write access.
TYPE – of files and it’s identification.
- DIR – Directory
- REG – Regular file
- CHR – Character special file.
- FIFO – First In First Out
2. List User Specific Opened Files
3. Find Processes running on Specific Port
4. List Only IPv4 & IPv6 Open Files
5. List Open Files of TCP Port ranges 1-1024
6. Exclude User with ‘^’ Character
7. Find Out who’s Looking What Files and Commands?
8. List all Network Connections
9. Search by PID
10. List all TCP or UDP connections