Maze Posted March 10, 2016 Share Posted March 10, 2016 hello dear community I’m trying to capture the output of the top command into a file. When I execute top > output.txt, the output.txt file contains lot of junk characters. What is the best method to capture the output of the top command into a readable text file?i tried to use the top command batch mode operation option ( -b ) to capture the top command output into a file.top -n 1 -b > top-output.txt or this one less top-output.txtbut - unfotunatly they do not work for me... : linux-a9sq:/home/martin # -n 1 > top-output.txt -n: command not found linux-a9sq:/home/martin # top-output.txt If 'top-output.txt' is not a typo you can use command-not-found to lookup the package that contains it, like this: cnf top-output.txt linux-a9sq:/home/martin # top -n 1 -b > top-output.txt linux-a9sq:/home/martin # top -n1 -b | head5 If 'head5' is not a typo you can use command-not-found to lookup the package that contains it, like this: cnf head5 linux-a9sq:/home/martin # what can i do!? love to hear from you greetings Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.