โ† All 010-160 Flashcard Decks

Linux Command Line & Shell Scripting 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 Linux Command Line & Shell Scripting flashcards as text
  1. What does the command tail -f /var/log/syslog do?

    Answer: Continuously displays new lines appended to syslog

    tail -f follows a file and prints new lines as they are written, useful for live log monitoring.

  2. In a bash for loop, which syntax correctly iterates over the values 1 2 3?

    Answer: for i in 1 2 3; do echo $i; done

    Bash for loops use the syntax: for variable in list; do commands; done.

  3. Which command prints the current working directory?

    Answer: pwd

    pwd (print working directory) outputs the absolute path of the current directory.

  4. How do you redirect standard error (stderr) to a file named errors.txt?

    Answer: command 2> errors.txt

    File descriptor 2 refers to stderr, so 2> redirects error output to the specified file.

  5. What character begins a comment in a bash script?

    Answer: #

    In bash, everything after # on a line is treated as a comment and ignored by the shell.

  6. Which command makes a shell script named setup.sh executable?

    Answer: chmod +x setup.sh

    chmod +x adds the execute permission bit for all users on the specified file.

  7. What does the command sort -r file.txt do?

    Answer: Sorts file.txt in reverse (descending) order

    sort -r reverses the default sort order, displaying lines from Z to A (or largest to smallest).