How To Output “the Command’s Output” To A Text File In Unix?
Filed in Questions |Tags: "the, command, Commands, File, lpg, Output, Solaris, text, Unix
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?



Monday, February 8th 2010 at 7:34 pm |
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