[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: multible partitions?

On Saturday 04 June 2005 12:18, Wolf Drechsel wrote:

> "....." meant more output, as a
> mount /dev/sda1 -t hfsplus /hfs >& /tmp/hfsmountoutput
> didnt make a reasonable file (how do I do that
> correctly?), I had to copy all from the screen
> and left out the less important looking.
> I hope these are enough data - if it is required
> more detailed, please give me a hint how I can
> get the whole output of "mount" into a file".


A little unix voodoo.

If I'm teaching you to suck eggs with a couple of these, please feel free to 
skip them ;)

There are three 'streams' involved: stdin (where the process reads from), 
stdout (where the process prints output to), and stderr (where the process 
prints errors to).

mount /dev/sda1 -t hfsplus /hfs > /tmp/hfsmountoutput

sends stdout to that location.

Most of the errors probably went to stderr (Arguably they all should -there 
are holy wars about where exactly to draw the line here).

If you do:

mount /dev/sda1 -t hfsplus /hfs > /tmp/hfsmountoutput 2>&1

that means: send stdout to the file, and send stderr to stdout.

So, the whole lot will end up in the file.


Attachment: pgpgV50nE0ydh.pgp
Description: PGP signature

Reply to: