Top 300 Linux Commands Asked in Interveiw 1740943502
Top 300 Linux Commands Asked in Interveiw 1740943502
com
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.
25. locate file.txt – Finds the location of a file using a pre-built index.
30. awk '{print $1}' file.txt – Prints the first column of a file.
31. awk -F: '{print $1}' /etc/passwd – Prints the first field of the
/etc/passwd file, separated by colons.
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.
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.