How to resemble output of a top right into a message documents?

I intend to write set or something, that will certainly write output of top right into a documents on login.

I did top >> output-file, yet it has some weird personality!

Can someone offer a straightforward tutorial concerning just how to write set documents in Linux?

2019-12-02 03:09:10
Source Share
Answers: 2

Try the adhering to

top -b -n1 > filename.txt

The -b is for set setting, which need to protect against the weird personalities. The -n1 informs it to just publish one model.

2019-12-03 05:05:32

Go to terminal and also type :

[email protected]:~$ top > filename.txt

The output of top command will certainly be currently saved in a message documents which lies in your house directory site.

See : Bash scripting Tutorial.

2019-12-03 05:00:12