Posts Tagged ‘cpq’

task spooler: a queue system for your commands

April 15, 2017 Leave a comment

In 2013 I wrote a program that allowed the user to put the copy and move file operations in a queue (blog post here).

Today I heard about a more general solution called task spooler (AUR, PPA). Task spooler can queue any Unix command, it has several options, so it’s a better solution than my previous approach.

Under Manjaro I couldn’t install it because the upstream URL was dead at that time. So I downloaded the task-spooler_1.0.orig.tar.gz file, converted it to deb format with the command alien, and then installed it with dpkg. Under Ubuntu the executable is called tsp.

Here is a short video about its usage where I heard about this program for the first time: Some examples with the most important options:

$ ts                       # show info
$ ts cp -r movies  /tmp    # put this task in the queue
$ ts -c ID                 # show the output of a running task
$ ts -C                    # clear finished tasks
Categories: Uncategorized Tags: , , ,

cpq and mvq: extensions of the Unix commands cp and mv to use a queue

March 28, 2013 Leave a comment

You browse your hard drive(s) and you want to copy/move several files to somewhere else. If the files are big (e.g. movies), then you need to wait minutes until a copy/move operation finishes. If the files are in different folders, you cannot select them all. If you try to launch each operation in the background, your machine will get very slow since all these operations will run concurrently.

Clearly, copy/move operations should be put in a queue and the next operation should start when the previous one terminates.

Under Windows you have Total Commander (F5/F6, then F2), but how to do it under Linux? Should I use Total Commander with wine? :) Under Linux I use Midnight Commander but in MC I didn’t find this feature. There is another Norton Commander clone called Krusader that has this feature but I didn’t like it much. I prefer MC :)

So, I came up with the following solution: create two command-line scripts called “cpq” and “mvq” that work like cp and mv (actually they call cp and mv) but they put tasks in a queue. These scripts launch a daemon process if necessary that executes each copy/move operation one after the other.

The project can be found here ( where you can also find a description about its installation.

Update (20130403)
Pierre (alias Deimos) wrote about “cpq” and “mvq” in his blog in French: Copy-Queue : un manager de copie de fichiers en ligne de commande.

Categories: bash Tags: , , , , ,