Unix Interview questions part-1

Unix Interview questions part-1

Postby admin » Thu Jun 28, 2012 10:43 am

1. Write command to list all the links from a directory?
ls -lrt | grep
2. Create a read-only file in your home directory?
chmod command you can also change your umask to
create read only file.
chmod 400
3. How will you find which operating system your system is running
on in UNIX?
By using command
“uname -a” in UNIX
4. How will you run a process in background? How will you bring that into foreground and how will you kill that process?
For running a process in background use “&” in command line. For bringing it back in foreground use command “fg jobid” and for getting job id you use command “jobs”, for killing that process find PID and use kill -9 PID command.
5. How do you know if a remote host is alive or not?
by using either ping or telnet command in UNIX.
6. How do you see command line history in UNIX?
use history command along with grep to find any relevant command you have already executed.
7. How do you copy file from one host to other?
Many options but you can say by using “scp” command.
8. How do you find which process is taking how much CPU?
By using “top” command in UNIX.
9. How do you check how much space left in current drive ?
By using “df”
command in UNIX. For example “df -h .” will list how full your current
drive is.
10. What is the difference between Swapping and Paging?
Whole process is moved from the swap device to the main memory for execution. Process size must be less than or equal to the available main memory. It is easier to implementation and overhead to the system. Swapping systems does not handle the memory more flexibly as compared to the paging systems.
Only the required memory pages are moved to main memory from the swap device for execution. Process size does not matter. Gives the concept of the virtual memory. It provides greater flexibility in mapping the virtual address space into the physical memory of the machine. Allows more number of processes to fit in the main memory simultaneously. Allows the greater process size than the available physical memory.
Site Admin
Posts: 83
Joined: Sat Dec 03, 2011 2:10 pm

Return to UNIX | Linux

Who is online

Users browsing this forum: No registered users and 2 guests