Question 1: Current Directory
Which command is used to display the absolute path of the current working directory?
- pwd
- ls -l
- cd .
- echo $PATH
- dir
Question 2: Directory Creation
What command would you use to create a new directory named 'my_project'?
- mkdir my_project
- create directory my_project
- newdir my_project
- md my_project
- touch my_project
Question 3: File Copying
Which command is used to copy a file named 'report.txt' from the current directory to a directory named 'backup'?
- cp report.txt backup/
- copy report.txt backup/
- move report.txt backup/
- mv report.txt backup/
- backup report.txt backup/
Question 4: Directory Navigation
What command will change the current directory to the parent directory?
- cd ..
- cd parent
- cd -
- up
- cd ../
Question 5: File Listing
Which command lists all files and directories, including hidden ones, in long format?
- ls -la
- ls -a
- ls -l
- ls -al
- ll
Question 6: File Removal
Which command is used to remove an empty directory named 'temp'?
- rmdir temp
- rm temp
- del temp
- remove temp
- erase temp
Question 7: File Renaming
What command renames the file 'old_file.txt' to 'new_file.txt'?
- mv old_file.txt new_file.txt
- rename old_file.txt new_file.txt
- rn old_file.txt new_file.txt
- cp old_file.txt new_file.txt
- ren old_file.txt new_file.txt
Question 8: File Content Display
Which command displays the contents of a file named 'data.txt' on the screen?
- cat data.txt
- show data.txt
- display data.txt
- print data.txt
- view data.txt
Question 9: Wildcard Usage
Which command will delete all files with the '.log' extension in the current directory?
- rm *.log
- del *.log
- remove *.log
- rm .log*
- rm *log
Question 10: Directory Deletion (Recursive)
What command will remove a directory named 'project' and all of its contents, including subdirectories and files?
- rm -r project
- rmdir -r project
- rm -rf project
- del project /s
- erase project /s