The Wayback Machine - https://web.archive.org/web/20240118172803/https://www.geeksforgeeks.org/batch-command-in-linux-with-examples/
Open In App
Related Articles

batch command in Linux with Examples

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

batch command is used to read commands from standard input or a specified file and execute them when system load levels permit i.e. when the load average drops below 1.5.

Syntax:

batch

It is important to note that batch does not accepts any parameters.

Other Similar Commands:

  • atq: Used to display the queue of pending jobs(this is because at and batch both uses the same job queue).
  • atrm: Used to remove the specified job from job queue.

Example:

  • Working with the batch command.
    top

  • Executing some commands using batch.

    • See the average load is lower than 1.5 that’s why the job queue is empty and command executed instantly.
    • Use ctrl +d when done giving commands to batch.
Learn to code easily with our course Coding for Everyone. This course is accessible and designed for everyone, even if you're new to coding. Start today and join millions on a journey to improve your skills!

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Commit to GfG's Three-90 Challenge! Purchase a course, complete 90% in 90 days, and save 90% cost click here to explore.
Last Updated : 15 May, 2019
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads
Complete Tutorials