Quiz

Exercise 1:

  1. Create a directory named "linux_tutorial"

  2. Create a file & save "f1.txt" inside it with content "hi i'm alive"

  3. Create another directory named subdir

  4. Navigate to subdir

  5. Create and save a file named "f2.txt" inside subdir with content "I'm not a donkey"

  6. hit cd (to come out completely)

  7. Find the file which contains "a donkey" string in entire your machine

  8. Open file "f2.txt", search for speific string or charcter and keep searching for all its occurences

  9. Now, without opening file "f2.txt" replace any existing string with "blah"

  10. Print the line numbers in f1.txt without opening it

Exercise 2:

  1. create directory path like "linux_tutorial/chapter1" in one go

  2. navigate to the chapter1

  3. just create and save 5 files with some name and some contents

  4. sort these files by thier

    1. alphabetic names

    2. size

Tip: Play a little more quizes online: http://lmgtfy.com/?q=linux+basic+quiz

Last updated