09 12 | 2014

Using bsdtar to change an archive format

Written by Tanguy

Classified in : Homepage, Debian, Command line, To remember

Streamable archive formats

Package icon

Archive formats such as tar(5) and cpio(5) have the advantage of being streamable, so you can use them for transferring data with pipes and remote shells, without having to store the archive in the middle of the process, for instance:

$ cd public_html/blog
$ rgrep -lF "archive" data/articles \
      | pax -w \
      | ssh newserver "mkdir public_html/blog ;
                       cd public_html/blog ;
                       pax -r"

Read more Using bsdtar to change an archive format

Archives