On 5/26/22 4:55 AM, Dirty Dawn wrote:
Hi,

i'm looking for a way to reproduce -O flag in bsdtar/gtar using tar
or pax but i didn't find one.

There is a way to do that using standard tar or pax?

Thank you

It generally works better if you tell us what you are wishing
to accomplish, rather than the option some other OS uses.
Sounds like you are trying to send tar output (or input) to
stdin/stdout.

The (a?) common "Unix way" of doing this is specifying the file
name "-".  This trick is portable across many Unixes and many
Unix commands:

  $ tar cf - * |ssh remote "tar xf -"
(tar current directory to stdout, send it via SSH to computer
"remote", and untar in the current directory on the remote
computer)

This works for a lot of commands...

  $ ssh remote "cat /etc/hosts" | diff -u - /etc/hosts

Nick.

Reply via email to