Just wondering; is it possible to skip the
some_command | ssh remote 'cat > outputfile'
? It feels like a UUOC.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
No, you need something that reads its stdin and writes it to some file.
cat is a good choice for that as it supports binary data and doesn't do anything fancy with its input so is small and efficient.
You could do:
... | ssh remote 'cp /dev/stdin outputfile`
But that would not be more efficient and would only work on systems that have