0

I simply want to append the outputs of two command which are ps -A and du into a file called "info"

This is what I've got:

ps -A ; du > info

However, it only adds du into the file. What am I getting wrong?

asked Jun 12, 2020 at 11:54
1

1 Answer 1

3

No need to use a subshell (another process) :

 { ps -A ; du; } > info
 # ^
 # |
 # mandatory (in this one liner case)

or

{
 ps -A
 du
} > info
answered Jun 12, 2020 at 12:23
0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.