Timedora
Free Online Flashcard Deck

Shell Filesystem Basics Free Online Flashcards

Study Shell Filesystem Basics with 12 free online flashcards. Review key terms, definitions, and concepts with this interactive flashcard deck.

12 cards
01
Front

How do relative and absolute paths differ?

Back

A relative path is interpreted from the current directory; an absolute path starts at the filesystem root.

02
Front

When should you use cp rather than mv?

Back

cp copies an item and leaves the original in place; mv moves it. mv also renames an item when given a new name in the same directory.

03
Front

A shell command gives no output. What should you do to verify its result?

Back

Silence alone does not prove the operation worked as intended. Inspect the destination afterward.

04
Front

Which commands remove an empty directory or a directory and its contents?

Back

Use rmdir for an empty directory. Use rm -R for a directory and its contents; inspect the path carefully because recursive deletion can remove many files.

05
Front

Which mkdir option creates missing parent directories?

Back

Use mkdir -p to create missing parent directories and avoid an error if the requested directory already exists.

06
Front

What does rm -i do before removing an item?

Back

The -i option prompts before each removal, giving you a chance to confirm it.

07
Front

What should you check before using touch on a file?

Back

touch can create an empty file, but it also updates the timestamp of an existing file. Check first if changing that timestamp is unwanted.

08
Front

How should you investigate “No such file or directory”?

Back

Check spelling, capitalization, the current directory with pwd, and path components with ls. Some filesystems distinguish uppercase and lowercase names.

09
Front

How do you copy a directory and its contents with cp?

Back

Use cp -R to copy a directory and its contents. Without -R, cp is used to copy files.

10
Front

What do pwd, ls -a, and ls -l show?

Back

pwd prints the current directory. ls lists items; -a includes hidden names, and -l shows a long listing.

11
Front

In a Unix-like shell, what do zero and nonzero exit statuses usually indicate?

Back

A zero exit status usually indicates success, while a nonzero status indicates failure. Still inspect the result to confirm the intended effect.

12
Front

What happens when you run mkdir -p for an existing directory?

Back

The -p option prevents an error if the requested directory already exists and creates any missing parent directories.