Listing Files in Current Directory
Which command will list all files, including hidden ones, in your current directory?
- ls -a
- ls -l
- ls -alh
- ls --hiiden
- ls -z
Changing Directories
What is the correct command to switch into the directory named 'Documents'?
- cd Documents
- cdocument Documents
- move Documents
- goto Documents
- cdocument
Copying Files
How would you copy a file named 'report.txt' from your current directory to a folder called 'backup'?
- cp report.txt backup/
- copy report.txt backup/
- mv report.txt backup/
- cp -d report.txt backup/
- copp report.txt backup/
Moving Files
Which command moves the file 'notes.txt' to a directory named 'Archive'?
- mv notes.txt Archive/
- move notes.txt Archive/
- cp notes.txt Archive/
- mv note.txt Archive/
- mv notes.txt archieve/
Removing Directories
To delete an empty directory named 'OldFiles', which command should you use?
- rmdir OldFiles
- rm -file OldFiles
- delete OldFiles
- rm -rf OldFiles/*
- rmdr OldFiles
Viewing File Contents
What command allows you to view the contents of a file named 'todo.txt' directly in the terminal?
- cat todo.txt
- open todo.txt
- lesser todo.txt
- ls todo.txt
- ct todo.txt
Searching for a File
Which command searches for a file named 'budget.xlsx' starting from the current directory?
- find . -name budget.xlsx
- locate budget.xlsx
- find -name budget.xslx
- search budget.xlsx
- find ./ budget.xlsx
Listing Directory Details
How can you list files in the current directory with extra details like permissions and size?
- ls -l
- ls -x
- lsdetails
- dirlist
- ls --all
Recursive Removal
Which command will delete a directory named 'temp' and all its contents, including subdirectories?
- rm -rf temp
- rm temp -r
- rmdir temp -a
- remove temp
- rm -f temp
Moving Multiple Files
If you want to move all '.jpg' files from the current directory to 'Photos', which command would you use?
- mv *.jpg Photos/
- cp *.jpg Photos/
- move .jpg Photos/
- mv *jpg Photos/
- mv ./*.jpg Photoz/