Bad support of ZIP archives with extra fields
Classified in : Homepage, Debian, Command line, To remember
For sharing multiple files, it is often convenient to pack them into an archive, and the most widely supported format to do so is probably ZIP. Under *nix, you can archive a directory with Info-ZIP:
% zip -r something.zip something/
(When you have several files, it is recommended to archive them in a directory, to avoid cluttering the directory where people will extract them.)
Using bsdtar to change an archive format
Classified in : Homepage, Debian, Command line, To remember
Streamable archive formats
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"
One archiver to rule them all: bsdtar
Classified in : Homepage, Debian, Command line
cpio > tar
Classified in : Homepage, Debian, Miscellaneous
tar and cpio
tar(5) and cpio(5) are two competing archive formats, that provide almost identical features. Both are streamed formats, originally designed to be used on tapes. Their major practical difference is the style of their standard command line utilities:
cpio(1)
takes the list of files to archive on its standard input, allowing a very high control but requiring to use another utility such asfind(1)
to archive an entire tree;tar(1)
usually takes the list of file to archive on its command line, and browses directories recursively be default.