Awesome
You write to special write-only FS - it produces tar archive. Can be used for conversion of cpio archive into tar one or for creating tar archives on the fly without prior saving everything to disk.
/tmp$ mkdir m
/tmp$ tarpipefs m | gzip > ololo.tar.gz&
[1] 1337
/tmp$ cd m
/tmp/m$ mkdir qqq
/tmp/m$ mkdir qqq/lol # no mkdir -p yet
/tmp/m$ echo Hello, world > qqq/lol/hello.txt
/tmp/m$ cd ..
/tmp$ fusermount -u m
[1]+ Done tarpipefs m | gzip > ololo.tar.gz
/tmp$ tar -tvf ololo.tar.gz
drwxrwxr-x root/root 0 2011-10-21 16:11 qqq
drwxrwxr-x root/root 0 2011-10-21 16:11 qqq/lol
-rwxrwxr-x root/root 13 2011-10-21 16:11 qqq/lol/hello.txt
This version is early and hacky:
- Using tar implementation extracted from Git;
- No chmod, no dates for directories/symlinks, no device nodes;
- Can't do "mkdir -p";
- Each single file is kept in memory;
- Not tested much;