Quiz
Linux Lab 4
Create a free account to finish this quiz
Save your progress and see your final score.
Already have an account? Sign in
Questions in this quiz (15)
1Which command syntax is correct if you want to assign read-only permission to everyone and write permission to the file owner?
- Achmod a+r u+w filename
- Bchmod a+r filename
chmod u+w filename - Cchmod a+w filename
chmod u+r filename - Dchmod g+r filename
chmod u+w filename
2Which command is used to change file ownership?
- Achowner
- Bchgrp
- Cchmod
- Dchown
3Why do we need pipes?
- ATo connect the user with a new command
- BTo further process the input of the preceding command
- CTo further process the output of the preceding command
- DTo join two files
4List 3 basic commands of file navigation?
- Als, pwd, cd
- Bls, pwd, chmod
- Cpipe, pwd, cd
- Dls, chgrp, cd
5Which command is used to remove a directory?
- Arm -r DIRECTORYNAME
- Brm DIRECTORYNAME
- Cmv -r DIRECTORYNAME
- Drm -i DIRECTORYNAME
6Which command is used to change group ownership of a file?
- Achgrp
- Bchgroup
- Cchown
- Dchmod
7What are the different ways to view a file?
- Acat
- Bvi
- Cmore
- Dless
- EAll of the above
8How to rename a file?
- Arename
- Bmv
- Crm
- Dchown
9Which command is used to search for a keyword or pattern in a file?
- Aawk
- Bsort
- Cgrep
- Decho
10What is the purpose of sort command?
- AIt cuts the file in half
- BIt sorts the output of a command
- CIt sorts the output of a file
- DNone of the above
- EB and C
- FA and C
11Why do we need to use help or man commands?
- AIt helps us remember the command
- BIt helps us remember the command options
- CIt helps us remember the purpose of a command and its options
- DHelp commands are useful to list directory contents
- EAll of the above
12What happens when you run the following command:
echo "Today is Sunday" >> testfile- AIt overwrites testfile with "Today is Sunday"
- BIt appends testfile with "Today is Sunday"
- CIt deletes the testfile and re-creates a new file with the name "Today is Sunday"
- DIt adds to the top of testfile
13Which of the following is used to add read and write permission to the owner and group of the source.txt file?
- Achmod a+rw source.txt
- Bchmod ug+rw source.txt
- Cchmod source.txt ug+rw
- Dchmod ug+rx source.txt
14What is the output of command wc -l file.txt if the file contents are:
firstline
secondline
thirdline
fourthline- A4 file.txt
- B5 file.txt
- C6 file.txt
- D8 file.txt
15There are 10 lines in a file, how do you print lines between 6 and 9 (all Inclusive)
- Acat somefile.txt | tail -5 | head -4
- Bcat somefile.txt | tail -6 | head -4
- Ccat somefile.txt | head -6 | head -2
- Dcat somefile.txt | tail -4 | head -4
Information
- Description
- 1 Linux Training Quiz on Linux Lab 4, created by Ahmed Aladdin on 30/12/2022.
- Author
- Ahmed Aladdin
- Language
- English
- Views
- 0
- Tags
- Rating
- No ratings yet Rate this quiz
More on Linux File Management and Permissions