
Linux Editing Files
Authored by Patrick Hines
Computers
Professional Development
Used 6+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
27 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
You need to modify a configuration file on a Linux server, but you don't have root access. What's the safest way to edit the file?
Open the file directly in a text editor.
Request root access from the administrator.
Use the sudo command with the appropriate editor.
Use a graphical file manager with root privileges.
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
You're working on a critical system configuration file. What's the BEST practice before making changes?
Edit the file directly and save your work.
Make the changes and reboot the system immediately.
Create a backup copy of the original file before editing.
Use the touch command to modify the file's timestamp.
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
You're editing a long log file and need to find a specific error message. Which command-line tool would be most helpful?
cp
mv
grep
rm
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
You accidentally delete a line of text while editing a file. How can you recover the lost line if you haven't saved the file yet?
The changes are permanently lost.
Use the history command to view past edits.
Most text editors have an undo function (often Ctrl+Z).
Restart the system and hope for the best.
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
You're collaborating with a teammate on a shell script. Which editor is known for its ease of use and clear visual interface?
nano
vi
emacs
All of the above
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
You need to edit a file that requires root privileges. What command would you use to open the file for editing with nano while using sudo?
sudo nano filename.txt
su nano filename.txt
nano sudo filename.txt
root nano filename.txt
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
You're working on a configuration file with sensitive information. How can you ensure the contents aren't displayed on your screen while editing?
There's no way to hide the content.
Use a graphical editor with a password prompt.
Use the /dev/null trick with your editor.
None of the above
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?