Handling Ordinary Files: Files in Unix, which Includes Program Instructions, Text, and Data

This is a computer science quiz on UNIX, which includes questions on handling ordinary files in UNIX (which includes program instructions, text, and data).

download.jpg
Start Quiz

Which command is used for displaying contents of a file?

cp rm cat mkdir

Multiple arguments as filenames can be specified in cat command.

True False

Which command is used to list all the files with extension .lst?

ls -l *.lst ls lst* ls *.* ls *[lst] None of the above

Which of the following keys is used to replace a single character with new text?

S s r C None of the above

Which command is used to extract specific columns from the file?

cat cut grep paste None of the above

Which command sends the word count of the file infile to the newfile.

wc infile >newfile wc newfile wc infile - newfile wc infile | newfile None of the above

Apart from displaying file contents, cat command is also used for _____ files.

Displaying

Deleting

Copying

Creating

Which option is used with the cat command for displaying non-printable characters?

-v

-n

-x

-a

Which option is used with the cat command for displaying files with line numbers?

-n

-v

-a

-x

Which option is used with the chmod command recursively to all files and sub-directories in a directory?

-1

-i

-x

-R

None of the above

Which symbol is used with cat command for creating files?

>

<

*

/

Which symbol is used to append an existing file?

>

<

>>

$

If we create a file using cat command with the same filename which already exists in the current directory then,

Existing file is deleted

New file will be created separately

Existing file will be overwritten

An error will be produced

Which of the following cannot be performed by cat command?

Displaying files

Creating files

Appending files

Deleting files

What does cat file01 file01 file01 display?

Error

Blank terminal

Contents of file01 three times successively

Contents of file01 single time

Quiz/Test Summary
Title: Handling Ordinary Files: Files in Unix, which Includes Program Instructions, Text, and Data
Questions: 15
Contributed by:
james