UNIX objective questions for freshers

1. UNIX can be best described as
a) Single user-single processing system
b) Single user-multi processing system
c) Multi user-single processing system
d) Multi user-multi processing system

2. Kernal refers to inode by index from
a) Super block
b) Boot block
c) Data block
d) None of the above.

3. Which is not a SCCS command?
a) Admin
b) get
c) ps
d) none

4) Which is the correct sequence of a program sequence (C) ?

5)Which of the following permission can be attached in UNIX environment
a) read only
b) hidden
c) archievly
d) none

6) The inode list in the disk consists of
(a) file owner identifier
(b) file type
(c) file access permissions
(d) All the above

7) WC command gives filename also along with count. How to supress it?
ans:- give standard input symbol before filename.

8)The other way of running shell script apart from using sh command and chmod?
ans:- using ! we can run a shell script

9:) As far as SCCS concerned which is false?
a) It is used to keep track of dependency b/w files
b) It just maintains difference b/w versions of various files.
c) it works in conjuction with MAKE.
d) It is mainly used for configuration management.

10:) How can you kill the last job run in background without using the ps command

questions on Unix:

1)What is the outcome of $mkdir -p dir/dir1/dir2/dir3
ans: it will create a rooted directory with one inside the other.

2)what is the output of $(date) | tee save | wc
ans: it will output the actual count of words in date to both output and file save.

3)what is the diff between $echo hello world > file $> file echo hello world
ans: it is the same.

4) what is the difference between $(var-item) $(var=item)
ans: the first will make the var display the value item in the following command if var is undefined.the second will assign the value item to var if var is undefined.

5)What is the output of the following commands:
$echo $$a
$echo $$$a
ans: Assume PID is 6008
then output is:

6)What is the ideal umask for directory?

7)What is the size of i-node entry in i-node table?
ANS:64 bytes

8)How do you reverse the background colour for session display?
ans:tput rev;

9)What would be the output of foll statement:
set We work at Infy echo $0

10)State true or false :Unix supports multiple file systems.

1. what is the ‘at’ command?
the ‘at’ command is used to schedule tasks at a later date.at takes as its argument the time the job
is to be executed. The command uses standard input to accept the script names that need to be executed

$ at 14:05

$at 5pm < prog2.sh >output


2. what is the “here” document?

The here document represents the fourth source of the standard input. Denoted by << . followed by a delimiter.The shell treats every line following the command and delimited by the string as input the command. The accompanying text following the here symbol is also part of the command line. It is especially useful when used with commands which dont accept the input filename as an argument. 3. what is an i-node?
i-node is a 16-bit structure maintained in a special area of the disk for storing the attributes of the file.
The table contains the file permissions, ownership details as well as the number of links of the file.

4. Difference between grep, egrep and fgrep
grep : does not accept more then one expression
egrep : accepts more than one pattern for search.Also accepts patterns from a file.
fgrep : accepts multiple patterns both from command line and file but does not accept regular expressions only strings.
It is faster than the other two and should be used when using fixed strings.

5. what is the output of the following ?

$echo *\ *

* *

$echo *\*


$echo * \*

list of all the files in current directory + *

$echo ‘* \*’

* \*

6. Difference between halt command and shutdown command
Halt command can be invoked by normal users to halt the system. This command in turn invokes Shutdown command.
Shutdown command can be invoked only by the superuser.

If you have questions, please ask below

One Comment

  1. Dhammaratna says:

    Hello sir,

    Please send me the information about Perl & shell langauges which are useful for me.
    I will be thankful if you do so.

    Thanking You.!!
    Warm Regards,
    Dhammaratna Dange

Leave a Reply

If you have any questions headover to our forums

You can use these XHTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <blockquote cite=""> <code> <em> <strong>