Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Module II Topics Overview

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

Which command would you use primarily to display the contents of a file?

a)

cat

b)

pwd

c)

mkdir

d)

rmdir

2.

Which command creates a new directory?

a)

mkdir

b)

rmdir

c)

mv

d)

makedir

3.

Which command is appropriate for renaming a file?

a)

mv

b)

cp

c)

rename

d)

rmdir

4.

Which command would confirm your present working directory?

a)

pwd

b)

cd

c)

cp

d)

rm

5.

Which operation best matches the cp command listed under file related commands?

a)

Copying files

b)

Deleting directories

c)

Displaying current directory

d)

Changing PATH

6.

Conditions to remove a directory?

a)

Dierectory should be empty

b)

You should place yourself one level up

c)

both A and B

d)

None of the above

7.

Which statement best distinguishes a UNIX text file from a binary file?

a)

A text file contains only printable characters and lines end with a newline (LF), whereas a binary file may include unprintable characters across the full ASCII range.

b)

A text file contains both printable and unprintable characters, while a binary file is limited to printable characters only.

c)

Text files cannot be displayed, while binary files display cleanly with the cat command.

d)

Binary files are only source code files, while text files include executables and object files.

8.

In a UNIX directory file, each entry includes which two components?

a)

The filename and file contents

b)

The filename and a unique identification number called the inode number

c)

The directory path and permissions only

d)

The inode number and file size only

9.

Which of the following characters cannot appear in a UNIX filename?

a)

Forward slash (/)

b)

Underscore (_)

c)

Hyphen (-)

d)

Period (.)

10.

In a UNIX file system, which symbol represents the root directory at the top of the hierarchical (inverted tree) structure?

a)

\ (backslash)

b)

/ (forward slash)

c)

~ (tilde)

d)

. (dot)

11.

Which command displays the absolute pathname stored in the HOME environment variable?

a)

echo HOME

b)

cat $HOME

c)

echo $HOME

d)

print HOME

12.

Which command displays the full path of your current directory in a Unix-like shell?

a)

cd

b)

pwd

c)

ls

d)

cat

13.

Which command correctly uses an absolute pathname to display the contents of the file login.sql located in /home/kumar when your current directory is /usr?

a)

cat login.sql

b)

cat ./login.sql

c)

cat /home/kumar/login.sql

d)

cat ../home/kumar/login.sql

14.

How long can a UNIX filename be?

a)

255 Characters

b)

8 Characters

c)

8 Digits

d)

None of the above

15.

Frame cd commands to change from:/var/spool/lp/admins to/var/spool/mail

a)

$ cd ../../mail

b)

$ cd /mail

c)

$ cd mail.

d)

All of the above

16.

Find out the easiest way of creating this directory structure: share/man/cat1

a)

$mkdir share/man/cat1

b)

$ mkdir share share/man share/man/cat1

c)

$mkdir cat1/man/share

d)

$ MKDIR share/man/cat1

17.

What will cat foo foo foo display?

a)

Display the contents of file foo 3 times

b)

Display the Contents of file foo

c)

It will not display any output

d)

It stores the output in file foo

18.

How will you copy a directory structure bar1 to bar2?

a)

$ cp bar1 bar2

b)

$ cp –r bar1 bar2

c)

$ cp –I bar1 bar2

d)

$ cp –R bar1 bar2

19.

What are the two types of Device files?

a)

Text files and device file

b)

Block Device and Character Device

c)

Block and Stream file

d)

None of the above

20.

In a relative pathname . represents ------------- and . . represents ----------------------

a)

Current and Parent

b)

Parent and Current

c)

Nothing

d)

Root and Home