Unix/Linux System Commands Quiz
Test your knowledge of Unix/Linux operating system commands including process management, file system operations, networking, and shell commands
Questions
Command used to display the contents of the file in reverse order.
- tac
- cat
- tail -f <filename>
- head
Display only directories from a particular location/folder
- ls -d
- ls -l | grep "$d"
- ls -l | grep "^d"
- ls -ltr | grep -d
Command which can be used to copy the contents to file and also display on screen
- tee
- > (Redirection operator)
- Redirection operator (>) and Standard Ouput ($1)
- All
Command used to get the top 5 file / directory occupying more space.
- du | sort -r | head -5
- du | sort -nr | head -5
- du | sort -n | head -5
- du
Output of "echo $$"
- $$
- $
- Process ID of the current session.
- Process ID of the parent session
Command used to check the usage of the various file systems mounted
- df
- du
- 1 and 2
- None
Display only files with ".zip" extension from the current directory
- ls -ltr *.zip
- ls -ltr | grep "zip$"
- 1 and 2
- None
Which command would generate the ouput "Today is " eg: If today was 25th oct then the output would be "Today is 101025"
- echo "Today is
date +%y%m%d" - 1 and 2
- echo Today is
date +%y%m%d - None
Command used to verify the status of the Argon agent
- ps -ef | grep argon
- ps -ef | grep "argon"
- 1 and 2
- None
How kill the process in a single line?
- ps
- kill PID
- kill
ps <processname> - kill -9 "PID"
What is the default value of umask?
- 022
- 032
- 644
- 000
What is the command to see the number of fork in Linux system ?
- cat /proc/meminfo
- vmstat
- vmstat -f
- ls
How to find all the only hidden file in the dir?
- ls
- ls -s
- ls -a
- ls -a .*
How to find Kernel IP routing table ?
- ifconfig
- netstat -r
- ping
- none
How to get the info of only active internet connections in the Unix system ?
- netstat
- netstat -s
- netstat -t
- all the above
What is the default value of nice ?
- 3
- 1
- 11
- 0