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 totarto 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 the command line to create a tar file?
- How do I use the Unix tar zip command?
- How do I compress a file using gzip and tar.xz?
- How do I use the tar command line in Windows 10?
- How do I use tar in the Windows terminal?
- How do I use tar commands with xz?
- How do I extract a .xz file using the command line?
- How do I use gzip and tar in Linux?
- How do I use tar gzip with a password?
- How do I use gzip, tar, and unzip to compress files?
See more codes...