tar is like that because of command lines
tar [args] [one thing] [list of things]
it'd be wierd if it was
tar [args] [list of things] [filename]
... but i will admit i frequently make that mistake.
tar [args] [one thing] [list of things]
it'd be wierd if it was
tar [args] [list of things] [filename]
... but i will admit i frequently make that mistake.
tar [args] [list of things]
where [args] may contain [-f filename], among other things.That is, the destination filename is an optional argument; by default tar outputs to a tape device or stdout, depending on the implementation.
At least in GNU tar, the target filename can very well be specified as the last argument:
tar -c foo.txt bar.txt baz.txt -f stuff.tar cp [args] [list of things] [destination folder] cp [args] -t [destination folder] [list of things]
The same is true of mv. This is useful if you are piping filenames to xargs.