What are other useful tar options?

Here are some other useful options for the tar command:

  • -c: Create a new archive.
  • -x: Extract files from an archive.
  • -z: Compress the archive using gzip.
  • -v: Enable verbose mode, showing the progress of the operation.
  • -f: Specify the filename of the archive.
  • -C: Change to the specified directory before performing operations.
  • -t: List the contents of an archive.

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

0 Comments

no data
Be the first to share your comment!