wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

ICS113_Unix Commands

Total questions: 7

Worksheet time: 21mins

Name
Class
Date
1.

cd is equivalent to cd ~.

(Try it yourself in CentOS)

a)

True

b)

False

2.

Which of the following shortcuts move the mouse cursor to end of line ?

(Try it yourself in CentOS)

a)

CTRL-A

b)

CTRL-E

c)

CTRL-K

d)

CTRL-U

3.

Which of the following commands will list all the files in the current folder? (Multi-select; try it yourself in CentOS)

a)

ls

b)

ls -a

c)

ls -l

d)

ls -al

4.

To control access permissions to a file named "viewer.txt" in the current directory, what command is used to give write and execute permissions to the owner and group and no permissions to others?

(a)  

5.

Complete the command to move the file abc.txt from the current user's Desktop folder (inside the user's home) into the /etc directory.

Select the best answer. (/etc folder stores system configuration files, executables required to boot the system, and some log files.)

a)

sudo cp /etc ~/Desktop/abc.txt

b)

cp ~/Desktop/abc.txt /etc

c)

sudo cp ~/Desktop/abc.txt /etc

d)

cp /etc ~/Desktop/abc.txt

6.

Assuming the file data.csv contains comma-separated data, what command is used to cut out fields 7 and 9 and save the result (without error messages) to the file output.log?

(a)  

7.

Assuming the file employees.csv contains comma-separated text data listing employee numeric IDs, names and address, where the first field of each line is the numeric ID, write a grep command that uses a regular expression to return all employees with an employee ID ending with 3, 5, or 7.

a)

grep '^[0-9]*[357],' employees.csv

b)

grep '^[0-9]*[357]' employees.csv

c)

grep '^.*[357],' employees.csv

d)

grep '[0-9]*[357]' employees.csv