WorksheetsCSE105 Quiz 02
Total questions: 15
Worksheet time: 8mins
/dev/null
is a file
has write permission for all
is the UNIX built-in dustbin
All of these
The octal representation 652 indicates
Execute permission for the owner
Write permission for others
Read and write permission of groups
All of these
Which of the following command is used to count just the number of lines contained in a file?
wc -l
wc -c
wc -w
wc -r
Which of the following command is used to go to home directory?
cd..
cd/
cd
cd HOME
None of the above
Which command is used to move all files of your present working directory to the bin sub-directory of the parent directory?
mv *.* /bin/
mv * /bin/*
mv * ../bin
mv * ../bin *.*
None of the above
Which command is used to assign only read permission to all three categories of the file 'note'?
chmod go+r note
chmod a-rw
chmod ugo=r note
chmod u+r,g+r,o-x note
Which of the following shell's wildcards are used to match any number of characters including none?
_
[ijk]
[!ijk]
?
*
Which symbol will be used with grep command to match the pattern hello at the end of a line?
^hello
$hello
hello$
hello^
Which command is used to display all the lines with the string 'sales' from the file empl.lst?
cut sales empl.lst
/sales > empl.lst
grep sales empl.lst
cat | /sales > empl.lst
You can append to a file instead of overwriting by using the
> symbols
>> symbols
< symbols
<< symbols
The special shell variable $* is used
to exit status of last command executed.
to process number of the current shell
to list the positional parameters
to name the command being executed
The special shell variable $? is used
to store exit status of last command executed.
to process number of the current shell
to list the positional parameters
to name the command being executed
The cat command is used to
categories a file
display a file
print a file
copy a file
chmod ugo=rw file.txt command can be represent in octal as
chmod 777 file.txt
chmod 666 file.txt
chmod 555 file.txt
chmod 444 file.txt
The command to count the number of files in the current directory using pipe, is
ls | wc
ls | ws -c
ls | wc -w
None of the above
