Re: Pipe to tar or other compressor

Daniel Lawson <[email protected]>
Newsgroups gmane.org.user-groups.linux.new-zealand.general
Message-ID <[email protected]>
>   mysqldump {opts} | tar -cf --lzma - > outfile.7z
>
> doesnt work because tar expects a directory
>
> two steps works for the last method , but this is linux it must be 
> doable in one step?

tar --lzma -cf - <(mysq;dump ${opts} ) > outfile.7z


This opens up a named pipe, with the output of mysqldump being piped 
through it. tar sees this as a filedescriptor it can open.

_______________________________________________
NZLUG mailing list [email protected]
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.