Linux Interview questions | Visualpath

Linux Interview questions


1. script/command to delete last word from every line in a file

 awk '{gsub("[a-zA-Z0-9]*$", "");print}'  <filename>

 To replace last word with hello in every line

awk '{gsub("[a-zA-Z0-9]*", "hello");print}'  <filename>

2.script/command to find the files with more than 1gb size

find <path for directory> -size +1G -type f

3. What is Swap Space?
4.  What is the maximum length for a file name in Linux?
5.Which partition stores the system configuration files in Linux system?
6. Which command is used to uncompress gzip files?
7. What is the difference between soft and hard mounting points?
8. What are the file permissions in Linux?
9.  more questions are from sed, find and awk .
10. How to check Memory stats and CPU stats as a Linux admin?
11.How to reduce or shrink the size of LVM partition?
12. How can you enhance the security of password file?
13. What is the difference between Cron and Anacron?
14. What command is used to check the number of files, disk space and each user’s defined quota?
15. how can you manage memory in linux machines?
16. 18. What is the name and path of the main system log?
17. how to manage logical volumes?
18. Explain /proc filesystem?
19. What are the fields in the/etc/passwd file?
20.  How do you terminate an ongoing process?
21. How can you know the execution time of a command?
22. How can you append one file to another in  Linux?
23. How you can run an Linux program in the background simultaneously when you start your Linux Server?


Comments