I was reading about the top command and I came across something I don't quite understand:
top options:
-b Run in batch mode. This is useful for sending output from top to other programs or to a file. It executes the number of iterations specified with the -n option and terminates.
What is batch mode?
Otherwise :
How -b option is useful in the following command which iterates 5 times:
top -b -n 5 > file1 What is the difference between the command above and the following command which get rid of -b option:
top -n 5 > file1