Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

CSE105 Quiz 02

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

/dev/null

a)

is a file

b)

has write permission for all

c)

is the UNIX built-in dustbin

d)

All of these

2.

The octal representation 652 indicates

a)

Execute permission for the owner

b)

Write permission for others

c)

Read and write permission of groups

d)

All of these

3.

Which of the following command is used to count just the number of lines contained in a file?

a)

wc -l

b)

wc -c

c)

wc -w

d)

wc -r

4.

Which of the following command is used to go to home directory?

a)

cd..

b)

cd/

c)

cd

d)

cd HOME

e)

None of the above

5.

Which command is used to move all files of your present working directory to the bin sub-directory of the parent directory?

a)

mv *.* /bin/

b)

mv * /bin/*

c)

mv * ../bin

d)

mv * ../bin *.*

e)

None of the above

6.

Which command is used to assign only read permission to all three categories of the file 'note'?

a)

chmod go+r note

b)

chmod a-rw

c)

chmod ugo=r note

d)

chmod u+r,g+r,o-x note

7.

Which of the following shell's wildcards are used to match any number of characters including none?

a)

_

b)

[ijk]

c)

[!ijk]

d)

?

e)

*

8.

Which symbol will be used with grep command to match the pattern hello at the end of a line?

a)

^hello

b)

$hello

c)

hello$

d)

hello^

9.

Which command is used to display all the lines with the string 'sales' from the file empl.lst?

a)

cut sales empl.lst

b)

/sales > empl.lst

c)

grep sales empl.lst

d)

cat | /sales > empl.lst

10.

You can append to a file instead of overwriting by using the

a)

> symbols

b)

>> symbols

c)

< symbols

d)

<< symbols

11.

The special shell variable $* is used

a)

to exit status of last command executed.

b)

to process number of the current shell

c)

to list the positional parameters

d)

to name the command being executed

12.

The special shell variable $? is used

a)

to store exit status of last command executed.

b)

to process number of the current shell

c)

to list the positional parameters

d)

to name the command being executed

13.

The cat command is used to

a)

categories a file

b)

display a file

c)

print a file

d)

copy a file

14.

chmod ugo=rw file.txt command can be represent in octal as

a)

chmod 777 file.txt

b)

chmod 666 file.txt

c)

chmod 555 file.txt

d)

chmod 444 file.txt

15.

The command to count the number of files in the current directory using pipe, is

a)

ls | wc

b)

ls | ws -c

c)

ls | wc -w

d)

None of the above