All commands tested on Mac OS Monterey / Sep 12, 2023

How to list the contents of a tar archive

List the contents of the files.tar tar archive.

You can use this short tar command.

              
                  tar -tvf files.tar
              
          

Or this more verbose tar command.

              
                  tar --list --verbose --file files.tar
              
          

Load WordPress Sites in as fast as 37ms!


Options explained

  1. -t or --list tells tar to extract an existing archive
  2. v or --verbosetells tar to produce verbose output
  3. f or --filetells tar that the next parameter will be the tar file to create, extract, append to, list, etc.

More commands to list the contents of tar archives