Friday, April 15, 2011

UNIX Commands Interview Questions Part 3


1. Is it possible to restrict incoming message?
Yes, using the 'mesg' command.

2. What is the use of the command "ls -x chapter[1-5]"
ls stands for list; so it displays the list of the files that starts with 'chapter' with suffix '1' to '5', chapter1, chapter2, and so on.

3. Is 'du' a command? If so, what is its use?
Yes, it stands for 'disk usage'. With the help of this command you can find the disk capacity and free space of the disk.

4. Is it possible to count number char, line in a file; if so, How?
Yes, wc-stands for word count.
wc -c for counting number of characters in a file.
wc -l for counting lines in a file.

5. Name the data structure used to maintain file identification?
'inode', each file has a separate inode and a unique inode number.

6. How many prompts are available in a UNIX system?
Two prompts, PS1 (Primary Prompt), PS2 (Secondary Prompt).

7. How does the kernel differentiate device files and ordinary files?
Kernel checks 'type' field in the file's inode structure.

1 comment:

  1. Thank you for sharing this useful interview questions.

    Placement Papers

    ReplyDelete