01 / 06
A hundred files into one
Handing files to someone, nobody hands over a hundred loose ones. You put them in a box.
The tool that does that is tar.
docs/ tar cf docs.tar docs|- a.txt -> docs.tar (one file)\- inner/ \- b.txtThe name comes from tape archive. Long ago it was the tool for taking backups onto tape. Nobody uses tape now, and the name and the tool have stayed.
What matters is that tar is not a tool for compressing.
tar packs it up (the size hardly changes)gzip shrinks it (next lesson)"Packing" and "shrinking" are separate jobs. Linux combines small tools, so these two are separate too.
And the great strength of tar is that it keeps the shape of the directories. The nesting, the permissions and the owners all go into the box together.