Showing posts with the label Unix Interview Questions

Top Unix Interview Questions - Part 8

1. Write a command to print the lines that has the the pattern "july" in all the files in a particular directory? grep july * ...

Top Unix Interview Questions - Part 7

1. Write a command to display your name 100 times. The Yes utility can be used to repeatedly output a line with the specified string or ...

Top Unix Interview Questions - Part 6

1. Write a command to remove the prefix of the string ending with '/'. The basename utility deletes any prefix ending in /. The u...

Top Unix Interview Questions - Part 5

1. How to display the processes that were run by your user name ? ps -aef | grep <user_name> 2. Write a command to display all the...

Top Unix Interview Questions - Part 4

1. How do you write the contents of 3 files into a single file? cat file1 file2 file3 > file 2. How to display the fields in a text f...

Top Unix Interview Questions - Part 3

1. Display all the files in current directory sorted by size? ls -l | grep '^-' | awk '{print $5,$9}' |sort -n|awk '{p...

Top Unix Interview Questions - Part 2

1. How do you rename the files in a directory with _new as suffix? ls -lrt|grep '^-'| awk '{print "mv "$9" ...

Top Unix Interview Questions - Part 1

1. How to display the 10th line of a file? head -10 filename | tail -1 2. How to remove the header from a file? sed -i '1 d' fi...

Unix Interview Questions on FIND Command

Find utility is used for searching files using the directory information. 1. Write a command to search for the file 'test' in the...

Unix Interview Questions on CUT Command

The cut command is used to used to display selected columns or fields from each line of a file. Cut command works in two modes: Delimite...

Unix Interview Questions on SED Command

SED is a special editor used for modifying files automatically. 1. Write a command to replace the word "bad" with "good...

Unix Interview Questions on Grep Command

The grep is one of the powerful tools in unix. Grep stands for "global search for regular expressions and print". The power of gr...

Unix Interview Questions on Awk Command

Awk is powerful tool in Unix. Awk is an excellent tool for processing the files which have data arranged in rows and columns format. It is ...

Load More That is All