When I have a tar archive of any format, I can use:tar xf archive.tar.xztar xf anotherarchive.tar.gzas tar discovers the relevant format by itself.Now I want to download the archives and extract them without them being saved on the file system using wget:wget -qO- http://someserver.org/sometar.tar.xz | tar xf -C ~/extractTargettar: -C: Cannot open: No such file or directorytar: Error is not recoverable: exiting nowI realized that the f flag was causing trouble as it expects the actual file. Omitting it, now lets tar complain for the relevant flag.In case of the gz:tar: Archive is compressed. Use -z optionand in case of the xz:tar: Archive is compressed. Use -J optionAdding them makes my command work. Yet since tar is recognizing the archive format, I wonder:Is there a way for it to extract them without adding the flag just like xf?
Can tar discover the archive format when piping it in via wget?
ubuntu;tar;gnu