CLI Navigator Quiz: Master Your Filesystem Quiz

  1. Question 1: Current Directory

    Which command is used to display the absolute path of the current working directory?

    1. pwd
    2. ls -l
    3. cd .
    4. echo $PATH
    5. dir
  2. Question 2: Directory Creation

    What command would you use to create a new directory named 'my_project'?

    1. mkdir my_project
    2. create directory my_project
    3. newdir my_project
    4. md my_project
    5. touch my_project
  3. Question 3: File Copying

    Which command is used to copy a file named 'report.txt' from the current directory to a directory named 'backup'?

    1. cp report.txt backup/
    2. copy report.txt backup/
    3. move report.txt backup/
    4. mv report.txt backup/
    5. backup report.txt backup/
  4. Question 4: Directory Navigation

    What command will change the current directory to the parent directory?

    1. cd ..
    2. cd parent
    3. cd -
    4. up
    5. cd ../
  5. Question 5: File Listing

    Which command lists all files and directories, including hidden ones, in long format?

    1. ls -la
    2. ls -a
    3. ls -l
    4. ls -al
    5. ll
  6. Question 6: File Removal

    Which command is used to remove an empty directory named 'temp'?

    1. rmdir temp
    2. rm temp
    3. del temp
    4. remove temp
    5. erase temp
  7. Question 7: File Renaming

    What command renames the file 'old_file.txt' to 'new_file.txt'?

    1. mv old_file.txt new_file.txt
    2. rename old_file.txt new_file.txt
    3. rn old_file.txt new_file.txt
    4. cp old_file.txt new_file.txt
    5. ren old_file.txt new_file.txt
  8. Question 8: File Content Display

    Which command displays the contents of a file named 'data.txt' on the screen?

    1. cat data.txt
    2. show data.txt
    3. display data.txt
    4. print data.txt
    5. view data.txt
  9. Question 9: Wildcard Usage

    Which command will delete all files with the '.log' extension in the current directory?

    1. rm *.log
    2. del *.log
    3. remove *.log
    4. rm .log*
    5. rm *log
  10. Question 10: Directory Deletion (Recursive)

    What command will remove a directory named 'project' and all of its contents, including subdirectories and files?

    1. rm -r project
    2. rmdir -r project
    3. rm -rf project
    4. del project /s
    5. erase project /s