Mastering Unix Commands

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Which command is used to compress a file?

  • gzip (correct)
  • wc
  • grep
  • gunzip

Which parameter is used with the 'grep' command to perform a case insensitive search?

  • -l
  • -r
  • -n
  • -i (correct)

Which command is used to count lines, words, and bytes of a file?

  • gunzip
  • gzip
  • wc (correct)
  • grep

Which command is used to sort the contents of a file in reverse order?

<p>sort -r (D)</p> Signup and view all the answers

Which command is used to remove consecutive duplicate lines from a file?

<p>uniq (D)</p> Signup and view all the answers

Which command is used to extract specific fields from each line of a file using a delimiter?

<p>cut (D)</p> Signup and view all the answers

The 'gzip' command is used to decompress a gzipped file.

<p>False (B)</p> Signup and view all the answers

The 'grep' command can be used to search for a specific pattern in a file.

<p>True (A)</p> Signup and view all the answers

The 'wc' command can only count lines in a file.

<p>False (B)</p> Signup and view all the answers

The 'sort' command can only sort files based on alphanumeric values.

<p>False (B)</p> Signup and view all the answers

The 'uniq' command removes all duplicate lines in a file, even if they are not consecutive.

<p>False (B)</p> Signup and view all the answers

The 'cut' command can extract specific fields from each line of a file using a delimiter.

<p>True (A)</p> Signup and view all the answers

Which command is used to compress a file?

<p>gzip (A)</p> Signup and view all the answers

What parameter is used with the 'grep' command to perform a case insensitive search?

<p>-i (C)</p> Signup and view all the answers

Which command is used to count lines, words, and bytes of a file?

<p>wc (A)</p> Signup and view all the answers

Which command is used to redirect output to a file?

<p>cat (D)</p> Signup and view all the answers

What does the 'uniq' command do?

<p>Removes consecutive duplicate lines from a file (D)</p> Signup and view all the answers

What does the 'cut' command do?

<p>Extracts specific fields from each line of a file (D)</p> Signup and view all the answers

Flashcards are hidden until you start studying

More Like This

Mastering UNIX Command-Line
5 questions
Mastering UNIX
5 questions

Mastering UNIX

ExcitingRhodonite3899 avatar
ExcitingRhodonite3899
Use Quizgecko on...
Browser
Browser