links for 2011-09-13

14 09 2011
  • $ split -b 1394786 big.log
    $ ls -1 x*
    xaa
    xab

    xew

    Split creates its output files in decreasing alphabetic order. Thus when you list them in the shell they are in the order in which
    they were split. As such, you can simply use cat to merge the files. (Thanks to Paul and Davidov for pointing out my for loop was superfluous.)

    $ cat x* >merged.big.log
    $ ls -l *.log
    -rw-rw-r– 1 brock brock 175743061 Oct 12 22:08 big.log
    -rw-rw-r– 1 brock brock 175743061 Oct 12 01:11 merged.big.log
    $ diff merged.big.log big.log
    $ md5sum *.log
    47de08911534957c1768968743468307 big.log
    47de08911534957c1768968743468307 merged.big.log

    (cat works for files created with hjsplit, too)


Acciones

Information

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión / Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión / Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión / Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión / Cambiar )

Conectando a %s




A %d blogueros les gusta esto: