Episode: 122 Title: HPR0122: Batch processing on Linux Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr0122/hpr0122.mp3 Transcribed: 2025-10-07 11:45:05 --- . Hey it's Steve Geek and welcome to another episode of Hacker Public Radio. On today's short episode I want to tell you about batch processing on Linux using the at and batch commands. Now before we get into this to make sure you have them if you run Debian Linux you already have them installed. If you run another flavor of Linux you may want to check and make sure you have the package at Alfred Pango at installed. Now that's processing. You might be asking yourself deep deep why do we want to do this? Didn't this go out in the 70s? Well yes and no it's certainly less prevalent as machines have gotten faster but you often have lots of jobs that could benefit from being run automatically. Such as converting videos from one format to another converting waves to MP3s something like that. For the example I'll use I'll be converting an MP3 to an odd with higher compression for the sake of a digital music player. So how would this work? Well if you want to run jobs in succession as compute as CPU processor time permits we use the batch command and it's very easy to do. You kick off the next term you pipe in batch and hit enter and it'll come up with a little mini shell where you can type in commands. So you get your mini shell where you can pipe in a line and you type in like in my case for my example I type an MP3 to odd space dash dash quality equal zero dash been rev whatever that MP3 at hit enter you get the mini shell line again you control D to get out of that and you can do that as many times as you want in succession each time you do that it's going to say something like job so-and-so. Now it'll begin running jobs in the background and as it runs the jobs it'll wait until this 3 CPU time to pick off the next job and as it finishes each job it's going to email you the results of your job. So in this case you'll see files popping up in your directory with the new format and providing that you have your internal email sub correct with it is to say that you're set up to read emails sent from within your system as well as from the internet you'll see you know one mail message waiting two mail messages waiting you know and then you can go for your mail time read them and in the background very efficiently you'll step through any number of files and convert them and it's a great thing to do that's the operation of the command batch now the other command which does almost the same thing is at and what add is for is taking off a job at a specific time so you can instead of typing batch can type in at space 1pm or at space 1300 or at midnight or at now plus one hour and then the mini shell will come up again you'll type in your batch commands and at the appointed time that will kick off and run the job and in this way you know you can have a little computerized computer operator working free within your computer I hope you've enjoyed today's episode of Hacker Public Radio Hacker Public Radio is community radius so please consider recording your own episodes have a lovely day thank you for listening to Hacker Public Radio HPR is sponsored by Carol.net so head on over to C-A-R-O dot