← All 010-160 Flashcard Decks

Linux Filesystem & File Management 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 Filesystem & File Management flashcards as text
  1. Which command shows the current working directory?

    Answer: pwd

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

  2. What does `rm -rf /tmp/testdir` do?

    Answer: Recursively and forcefully removes /tmp/testdir and all its contents

    `rm -r` removes directories recursively and `-f` suppresses prompts and ignores nonexistent files.

  3. What type of file does `ls -l` show when the first character of the permissions field is 'l'?

    Answer: Symbolic link

    In `ls -l` output, 'l' as the first character of the permissions string indicates a symbolic (soft) link.

  4. Which command can be used to display the last 20 lines of a file?

    Answer: tail -20 file

    `tail -20 file` (or `tail -n 20 file`) displays the last 20 lines of the specified file.

  5. What is the purpose of the `/var` directory in the Linux filesystem hierarchy?

    Answer: Contains variable data that changes during system operation, like logs and spool files

    /var holds variable data that grows and changes during normal system operation, including log files, mail spools, and databases.

  6. How do you search for the string 'error' in all `.log` files in the current directory?

    Answer: grep 'error' *.log

    `grep 'error' *.log` searches for the pattern 'error' across all files matching *.log in the current directory.

  7. What does the `chmod 755 script.sh` command do?

    Answer: Gives the owner full permissions and others read+execute permissions

    755 means owner gets rwx (7), group gets r-x (5), and others get r-x (5) — full control for owner, read+execute for everyone else.