CLI File Management Skills Quiz Quiz

  1. Listing Files in Current Directory

    Which command will list all files, including hidden ones, in your current directory?

    1. ls -a
    2. ls -l
    3. ls -alh
    4. ls --hiiden
    5. ls -z
  2. Changing Directories

    What is the correct command to switch into the directory named 'Documents'?

    1. cd Documents
    2. cdocument Documents
    3. move Documents
    4. goto Documents
    5. cdocument
  3. Copying Files

    How would you copy a file named 'report.txt' from your current directory to a folder called 'backup'?

    1. cp report.txt backup/
    2. copy report.txt backup/
    3. mv report.txt backup/
    4. cp -d report.txt backup/
    5. copp report.txt backup/
  4. Moving Files

    Which command moves the file 'notes.txt' to a directory named 'Archive'?

    1. mv notes.txt Archive/
    2. move notes.txt Archive/
    3. cp notes.txt Archive/
    4. mv note.txt Archive/
    5. mv notes.txt archieve/
  5. Removing Directories

    To delete an empty directory named 'OldFiles', which command should you use?

    1. rmdir OldFiles
    2. rm -file OldFiles
    3. delete OldFiles
    4. rm -rf OldFiles/*
    5. rmdr OldFiles
  6. Viewing File Contents

    What command allows you to view the contents of a file named 'todo.txt' directly in the terminal?

    1. cat todo.txt
    2. open todo.txt
    3. lesser todo.txt
    4. ls todo.txt
    5. ct todo.txt
  7. Searching for a File

    Which command searches for a file named 'budget.xlsx' starting from the current directory?

    1. find . -name budget.xlsx
    2. locate budget.xlsx
    3. find -name budget.xslx
    4. search budget.xlsx
    5. find ./ budget.xlsx
  8. Listing Directory Details

    How can you list files in the current directory with extra details like permissions and size?

    1. ls -l
    2. ls -x
    3. lsdetails
    4. dirlist
    5. ls --all
  9. Recursive Removal

    Which command will delete a directory named 'temp' and all its contents, including subdirectories?

    1. rm -rf temp
    2. rm temp -r
    3. rmdir temp -a
    4. remove temp
    5. rm -f temp
  10. Moving Multiple Files

    If you want to move all '.jpg' files from the current directory to 'Photos', which command would you use?

    1. mv *.jpg Photos/
    2. cp *.jpg Photos/
    3. move .jpg Photos/
    4. mv *jpg Photos/
    5. mv ./*.jpg Photoz/