Quite simple. If you omit the -f
parameter, output is passed to stdout:
gammy@denice:/tmp/demo$ tar -c a b c
a0000644000175000017500000000000011435437117010223 0ustar gammygammyb0000644000175000017500000000000011435437117010224 0ustar gammygammyc0000644000175000017500000000000011435437117010225 0ustar gammygammygammy@denice:/tmp/demo$ ls
a b c
gammy@denice:/tmp/demo$
...what a mess!
The -f
-parameter (as you quoted) expects a filename (and optionally a hostname), hence the first argument after it is the output filename:
gammy@denice:/tmp/demo$ tar -cf output.tar a b c
gammy@denice:/tmp/demo$ ls
a b c output.tar
gammy@denice:/tmp/demo$