350-201(NEW-127Q) · Question #32
A system administrator must organize files, navigate directories, and set environment variables to optimize the development environment on a Linux server. The administrator must perform several…
The correct answer is C. Use mv to move files, ls to list directory contents, and add environment variables to .bashrc to persist across sessions. Option C is correct because it pairs each task with the right tool: mv moves (renames) files without duplicating them, ls lists directory contents, and appending export VAR=value to .bashrc ensures environment variables are re-set every time a new shell session starts…
Question
Options
- AUse move to move files, cd to navigate directories, and set environment variables using addenvor envor.
- BUse rm to move files, echo to navigate directories, and store environment variables in /etc/profile to persist across user sessions.
- CUse mv to move files, ls to list directory contents, and add environment variables to .bashrc to persist across sessions.
- DUse cp to move files, cd to list directory contents, and set environment variables with export to persist across sessions.
How the community answered
(51 responses)- A4% (2)
- B2% (1)
- C92% (47)
- D2% (1)
Explanation
Option C is correct because it pairs each task with the right tool: mv moves (renames) files without duplicating them, ls lists directory contents, and appending export VAR=value to .bashrc ensures environment variables are re-set every time a new shell session starts - achieving true persistence per user.
Why the distractors fail:
- A -
move,addenvor, andenvorare not valid Bash commands; they don't exist. - B -
rmremoves files, it doesn't move them;echoprints text, it doesn't navigate directories./etc/profileis system-wide, not user-specific, making it the wrong choice for a single user's persistent variables. - D -
cpcopies files (leaving the original in place), so it doesn't truly move anything;cdchanges directories rather than listing their contents.
Memory tip: Think "M-L-B" - Move, List, Bashrc" - mv to Move files, ls to List contents, and .bashrc for persistent Bash variables. If a command's name doesn't match its job description in the answer (like rm for "move"), it's a trap.
Topics
Community Discussion
No community discussion yet for this question.