What are other tar options?

091

Here are some common options for the tar command:

  • -x: Extract files from an archive.
  • -t: List the contents of an archive without extracting it.
  • -z: Compress or decompress the archive using gzip.
  • -j: Compress or decompress the archive using bzip2.
  • -v: Verbose mode, showing the progress of the operation.
  • -f: Specify the filename of the archive.
  • -C: Change to the specified directory before performing operations.
  • -p: Preserve permissions when extracting files.
  • --delete: Remove files from the archive (only works with uncompressed archives).

These options can be combined to perform various operations with the tar command effectively. For example, tar -czvf archive.tar.gz directory creates a compressed archive with verbose output.

0 Comments

no data
Be the first to share your comment!