Skip to content

reads a possibly truncated tar file from stdin and writes a non-truncated tar to stdout

License

Notifications You must be signed in to change notification settings

apokalyptik/safetar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

safetar

Reads a possibly truncated tar file from stdin and writes a non-truncated tar to stdout

The following takes an archive where the last file is truncated (incomplete download?) and creates a new file with everything but that truncated file.

cat archive-incomplete.tar | safetar > archive-only-entire-files.tar

The usefulness of this is admittedly narrow, the main purpose is to be used in pipelines where (over)?writing a file that is not complete to the output stream is undesirable.
In my testing existing tar commands will write a full size file with as much data as possible and the rest of the data as null bytes which is not always what you want.

About

reads a possibly truncated tar file from stdin and writes a non-truncated tar to stdout

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages