top command

Posted on 2012-08-11
Last Modified: 2012-08-13
I typed the following command in order to be able to view more than one screen of the top command:

top -b -d 1 > ~/top.list

I pressed 'control q' for the command to stop.

I located the top.list file and it was quite large even though the command hadn't been running for long.

My question is, was 'control q' enough to stop the command or might the top.list file be created again?

thanks for your help.
Question by:netplus21
    1 Comment
    LVL 37

    Accepted Solution


    top -b means that you run top in batch mode

    -d 1 means that you run top with a delay of 1 second

    Running top this way means it creates output every second to your file. q quits the top command. Your command will keep on adding output to the file until you quit top.

    If you want to run top just once and get output in a file, do this:
    top -b -n 1 > ~/top.list

    Open in new window

    You may add to your output file by using >> instead of > btw.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
    Join Greg Farro and Ethan Banks from Packet Pushers ( and Greg Ross from Paessler ( for a discussion about smart network …
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now