How to echo output of a top into a text file?
Try the following
top -b -n1 > filename.txt
The -b
is for batch mode, which should prevent the strange characters. The -n1
tells it to only print one iteration.
Try the following
top -b -n1 > filename.txt
The -b
is for batch mode, which should prevent the strange characters. The -n1
tells it to only print one iteration.