How To Output “the Command’s Output” To A Text File In Unix?

Filed in Questions  |  
Tags: , , , , , , , ,
TOP del.icio.us digg

hi, i am working on solaris
trying to execute this command.
du -k /lpg
the command works ok but i want the output not to be displayed on screen but instead to be written in a text file.
i tried this but it didnt work.
du -k /lpg > /izmir1/output.txt
Somebody has an idea?

One Comment

  1. Comment by Gandalf Parker:

    it depends on what shell you are running but Im guessing that you want to direct BOTH the normal output and the error output.
    Try this….
    du -k /lpg >& /izmir1/output.txt

Trackbacks / Pingbacks

Leave a Reply

Improve the web with Nofollow Reciprocity.