cli-apps: GNU parallel

parallel - build and execute shell command lines from standard input in parallel
parallel [options] [command [arguments]] < list_of_arguments
parallel [options] [command [arguments]] ( ::: arguments | :::: argfile(s) ) ...
parallel --semaphore [options] command
#!/usr/bin/parallel --shebang [options] [command [arguments]]

GNU parallel is a shell tool for executing jobs in parallel using one or more computers. A job can be a single command or a small script that has to be run for each of the lines in the input. The typical input is a list of files, a list of hosts, a list of users, a list of URLs, or a list of tables. A job can also be a command that reads from a pipe. GNU parallel can then split the input into blocks and pipe a block into each command in parallel.
If you use xargs and tee today you will find GNU parallel very easy to use as GNU parallel is written to have the same options as xargs. If you write loops in shell, you will find GNU parallel may be able to replace most of the loops and make them run faster by running several jobs in parallel.
GNU parallel makes sure output from the commands is the same output as you would get had you run the commands sequentially. This makes it possible to use output from GNU parallel as input for other programs.
For each line of input GNU parallel will execute command with the line as arguments. If no command is given, the line of input is executed. Several lines will be run in parallel. GNU parallel can often be used as a substitute for xargs or cat | bash.

Reader's guide
Before looking at the options you may want to check out the EXAMPLEs after the list of options. That will give you an idea of what GNU parallel is capable of.
You can also watch the intro video for a quick introduction:


Lunes de man pages: shred

Los Lunes descanso e intentare escribir sobre un man page de un comando nuevo que haya utilizado en la semana o algo así.

Ayer recordé que un cliente nos solicito pruebas de que eliminábamos segura, ya que para el es requerido entregar prueba de que ellos lo hacen por cosas legales y blah blah.

Shred es una herramienta parte del GNU core utils y su en su codigo fuente describe su funcionamiento en una manera bastante sencilla: “overwrite files and devices to make it harder to recover data“. Les dejo la introducción al man page.

       shred - overwrite a file to hide its contents, and optionally delete it

       shred [OPTION]... FILE...

       Overwrite  the specified FILE(s) repeatedly, in order to make it harder
       for even very expensive hardware probing to recover the data.

       Mandatory arguments to long options are  mandatory  for  short  options

¿more vs less? ¿ifconfig vs ip? RTFM :)

Sigo sin entender por que muchos sitios en sus ejemplos usan MORE y IFCONFIG todavía. Jóvenes usen  LESS y IP de ahora en adelante.

man more
 more - file perusal filter for crt viewing
 more [options] file [...]
 more is a filter for paging through text one screenful at a time. This version is especially primitive. Users should realize that less(1) provides more(1) emulation plus
 extensive enhancements.

man ifconfig
       ifconfig - configure a network interface

       ifconfig [-v] [-a] [-s] [interface]
       ifconfig [-v] interface [aftype] options | address ...

       This program is obsolete!  For replacement check ip addr and ip link.  For statistics use ip -s link.