LOGBOOK

HELP

Quiz Entry - updated: 2026.07.14

What are the core tar operation and modifier flags?

Operations pick the verb — -c create, -x extract, -t list; modifiers tune it — -f names the file, -v is verbose, -p keeps permissions.

tar's flags split into two groups. Exactly one operation says what to do; modifiers refine it:

Flag Long form Role
-c --create Operation: make a new archive
-x --extract Operation: unpack an archive
-t --list Operation: list contents (without extracting)
-f --file Modifier: the next word is the archive filename
-v --verbose Modifier: print each file as it's processed
-p --preserve-permissions Modifier: restore original permissions on extract

The single most important modifier is -f: it tells tar "operate on this file" rather than an actual tape device. Forget it and tar tries to read/write the default tape drive and appears to hang — so -f archive.tar is almost always present.

tar -cvf archive.tar /etc    # create, verbose, into archive.tar
tar -tvf archive.tar         # list verbosely (long-format listing)

Mnemonic: the three operations are "create, extract, list" — c / x / t. They're mutually exclusive; the rest just decorate.

Go deeper:

From Quiz: LIOS / Archiving and Software Packages | Updated: Jul 14, 2026