0

The command:

tar c DIR | compress >DIR.tar.Z

which works on a Debian-based Linux, fails on SunOS.

Why?

2
  • What is the default place for the output on SunOs? It it to tape or to stdout?
    – Hennes
    Mar 3, 2015 at 17:57
  • 6
    When asking about a command that failed, you need to explain exactly how it failed. Was there an error message? What was it? Was an empty file created? A file with the wrong data? Did your computer explode? Please edit your question and clarify.
    – terdon
    Mar 3, 2015 at 18:02

2 Answers 2

5

Traditionally, tar tries to write to a tape device (/dev/rmt0 or such) if an output file isn't specified.

Default-stdout is a GNU tar change, but SunOS is not Linux and usually does not use GNU userspace; it's a bit more… traditional. Thus you need tar cf - DIR instead.

1

Maybe the compress command is not installed on the SunOS System.

I used the following command to zip files from SunOS:

tar cf - | gzip >myzip.zip

Because, systems may both be unixoid but linux is not SunOS is not HP-UX - although all have tar commands.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .