Command Line Navigation Flashcards
7 cards from real 010-160 practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Command Line Navigation flashcards as text
Which command would create a new directory called 'projects' in the current location?
Answer: mkdir projects
`mkdir` (make directory) creates a new directory with the specified name in the current or given path.
What does the `echo $PATH` command show?
Answer: A colon-separated list of directories searched for executables
$PATH is an environment variable containing a colon-delimited list of directories where the shell looks for executable commands.
Which `find` command option specifies the type of object to search for (file or directory)?
Answer: -type
`find -type f` finds regular files and `find -type d` finds directories, filtering results by object type.
What is a relative path?
Answer: A path described in relation to the current working directory
A relative path does not start with `/` and is interpreted relative to the current working directory (e.g., `docs/report.txt`).
Which command searches for the string 'error' inside a file named 'syslog.txt'?
Answer: grep error syslog.txt
`grep ` searches through file contents and prints lines that match the given pattern.
How do you run a shell script named 'setup.sh' located in the current directory?
Answer: ./setup.sh
`./setup.sh` explicitly tells the shell to run the script from the current directory, since `.` is not typically in $PATH.
What does the `clear` command do in the terminal?
Answer: Clears the terminal screen display
`clear` scrolls the terminal output up and redraws an empty screen, giving you a clean working view.