TOP Linux Commands
TOP Linux Commands
2. ls -al – Lists all files, including hidden ones, with detailed information.
24.find . -type f -name "*.log" – Finds all log files in the current
directory.
31.awk -F: '{print $1}' /etc/passwd – Prints the first field of the
/etc/passwd file, separated by colons.
117. cut -d':' -f1 /etc/passwd – Extracts the first field from a
colon-separated file.
119. tee file.txt – Writes output to both a file and the standard
output.
133. uptime -p – Shows how long the system has been running.
138. dmesg | grep error – Searches the kernel logs for errors.
191. strace -e open ls – Shows file open system calls used by ls.
192. tcpdump -XX – Captures packets with hex and ASCII output.
197. uptime -p – Shows how long the system has been running in a
human-friendly format.
207. mpstat -P ALL 5 – Displays CPU usage for all cores every 5
seconds.
264. usermod -aG sudo username – Adds a user to the sudo group.