1. How do you find files based on specific criteria using the find command?
The find command searches for files and directories based on conditions like name, size, or modification time.
_find /path/to/search -name “.log” -size +10M -mtime -7
_*
2. How do you search for a specific pattern in files using grep?
The grep command searches for patterns in files using regular expressions.
grep -r “error” /var/log/
3. How do you monitor real-time logs using tail?
The tail command displays the last few lines of a file, and the -f option allows real-time monitoring.
tail -f /var/log/syslog
4. How do you display disk usage using df?
The df command shows the disk space usage of file systems.
df -h
5. How do you check memory usage using free?
The free command displays memory usage, including free and used memory.
free -h
6. How do you compress files using tar?
The tar command creates compressed archives of files and directories.
tar -czvf archive.tar.gz /path/to/directory
7. How do you extract files from a tarball using tar?
The tar command extracts files from a compressed archive.
tar -xzvf archive.tar.gz
8. How do you check running processes using ps?
The ps command lists running processes on the system.
ps aux
9. How do you monitor system performance using top?
The top command provides a real-time view of system performance, including CPU and memory usage.
top
10. How do you kill a process using kill?
The kill command terminates a process by its PID (Process ID).
kill -9 PID
11. How do you manage services using systemctl?
The systemctl command is used to start, stop, restart, or check the status of services.
systemctl restart nginx
12. How do you change file permissions using chmod?
The chmod command modifies file or directory permissions.
chmod 755 script.sh
13. How do you change file ownership using chown?
The chown command changes the owner and group of a file or directory.
chown user:group file.txt
14. How do you create symbolic links using ln?
The ln command creates symbolic or hard links to files or directories.
ln -s /path/to/original /path/to/link
15. How do you schedule tasks using crontab?
The crontab command schedules recurring tasks using cron jobs.
crontab -e
Search
Categories
Recent Posts
Top Git interview Questions for Experienced Developer
Speed-up tips and tricks for Windows 11
Top 15 Linux Commands used by Experienced Developer
Top SQL Interview Examples for Experienced Developer
Internal Working of Java HashMap
Recent Tags