cli-tarHow can I track the progress of a Unix tar operation?
To track the progress of a Unix tar operation, you can use the --totals
flag in the tar
command. This flag will print out the total number of files and the total number of bytes written to the archive.
For example:
$ tar --totals -cf archive.tar /path/to/files
Total bytes written: 2097152 (2.0MiB, 2.1MB)
Total number of files: 3
The command consists of the following parts:
tar
: the command that creates the archive--totals
: the flag that prints out the progress information-cf
: the flags that indicate totar
to create a file archivearchive.tar
: the file name of the archive/path/to/files
: the directory containing the files to archive
For more information, see GNU tar Manual.
More of Cli Tar
- How do I use gzip, tar, and zip to compress files?
- How do I use the command line to tar and zip a file?
- How do I use the command line to tar and zip files?
- How can I use tar commands to zip a file?
- How do I use the Unix tar zip command?
- How do I create a tar.zip file in Unix?
- How do I use the command line to tar and zip a file?
- How do I use the command line to tar and distribute files?
- How do I use the Unix tar xvf command to extract files?
- How do I use the shell to tar and zip files?
See more codes...