Miscelánea de utilidades y comandos Linux

Ver si es util

cfget

arpalert
Según una lista de MACS válidas, alerta si aparece alguna que no toca

drraw is a simple web based presentation front-end for RRDtool
http://www.fi.muni.cz/~kas/mrtg-rrd/

SambaDAVs
https://github.com/1afa/sambadav

Hacer script para añadir usuarios a imagen base

Redes

arpalert
Según una lista de MACS válidas, alerta si aparece alguna que no toca

Gestión interfaces

Ver denominación de los diferentes interfaces
sudo lshw -class network -businfo

Gestión de VF de SR-IOV (Intel i350 aquí)

Comando find

Eliminar archivos según un patron
find ./ -iname "*_original" -exec rm {} \;

Comando tar

Go one level outside your folder and try:

tar -cvjSf folder.tar.bz2 folder

Or from the same folder try

sudo tar -cvjSf folder.tar.bz2 *

Comando at

at, batch, atq, atrm - queue, examine or delete jobs for later execution

batch = Ejecutar cuando la carga del sistema < 1.5

Webs
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/at.html
https://www.computerhope.com/unix/uat.htm

Para inscribir una nueva tarea, especificar at [momento] y luego, en línea de comandos, lo que se quiere ejecutar

ejemplos de especificación de tiempo

at midnight
at next week
at next monday
at now + 1 hour

Compresión de audio y video

Windows Powershell: convertir los wav del directorio de trabajo a flac (sin pérdida)
Get-ChildItem *.wav | ForEach-Object { ffmpeg -i $_.Name "$($_.BaseName).flac" }

Windows Powershell: convertir los avi del directorio de trabajo a mp4 h265:
Get-ChildItem *.avi | ForEach-Object { ffmpeg -i $_.Name -c:v libx265 -crf 23 -c:a copy "$($_.BaseName)_h265.mp4" }

Discos y espacios de almacenamiento

partclone
The utility for clone and restore a partition

fdisk
manipulate partition tables on a hard drive

fsarchiver
filesystem archiver

parted
a partition manipulation program

gdisk
text-mode menu-driven program for creation and manipulation of partition tables.

Velocidad de escritura

dd if=/dev/zero of=/mnt/temp/prueba bs=1G count=1 oflag=dsync

Velocidad de lectura (después de generar el archivo con la de escritura)

echo 3 | sudo tee /proc/sys/vm/drop_caches
dd if=/mnt/temp/prueba of=/dev/null bs=8k

Volcar una partición a archivo (puede hacerse loop después

# noerror == continue after read errors, notrunc == do not truncate the output file
pv -tpreb /dev/sdg1 | dd of=./pablo_respaldo bs=4096 conv=notrunc,noerror

Generación de contraseñas .htpasswd

Manual en Web Apache

Generar fila de htpasswd con contraseña bcrypt (segura)
htpasswd -nB [nombre de usuario]

Gestión y administración

  • sysbench - A modular, cross-platform and multi-threaded benchmark tool
  • gnu-fdisk - Linux fdisk replacement based on libparted
  • gdisk - Interactive GUID partition table (GPT) manipulator
  • parted - partition manipulation program
  • bonnie++ - toolkit for testing hard drive and file system performance
  • lshw - list hardware
  • powertop - power consumption and power management diagnosis tool
  • debsums - herramienta para la verificación de archivos de paquetes instalados con la suma de comprobación MD5

Control del SAI

Para consultar el estado
sudo upsc saibrocoli@brocoli.lechuga.eu

Para el control del demonio:
sudo upsmon --help

Multimedia

  • cmatrix
  • figlet Make large character ASCII banners out of ordinary text
  • cowsay configurable talking cow
  • fortune provides fortune cookies on demand
  • lolcat colorful `cat`
  • aewan - An ascii-art editor
  • binclock - prints time in binary format
  • toilet - display large colourful characters
  • divxenc - Para convertir DVD a mp4/divx
  • termsaver - simple text-based terminal screensaver
  • bins - para hacer páginas html de imagenes, con interpretación de EXIF
  • imageindex - a digital photo gallery tool

Gestión de archivos

  • rdfind - finds duplicate files
  • mlocate - find files by name
  • curlftpfs - mount a ftp host as a local directory
  • entr - run arbitrary commands when files change
  • davfs2 - mount a WebDAV resource as a regular file system
  • cadaver - command-line WebDAV client for Unix

Tareas

  • task
  • vit

Monitorización

  • glances CLI curses based monitoring tool
  • htop interactive processes viewer
  • nmon performance monitoring tool for Linux
  • smem - Report memory usage with shared memory divided proportionally
  • multitee - send multiple inputs to multiple outputs
  • colortail - log colorizer that makes log checking easier
  • binstats - display statistics about programs and libraries
  • multitail -i [fichero1] -i [fichero2] ... -i [fichero n] Ver multiples archivos de logs a la vez

Otros

  • prey - Set of scripts that helps you track your computer when it is stolen
  • urlview - URL extractor/launcher
  • biabam - biabam is a bash attachment mailer

A clasificar

  • stegsnow - whitespace steganography
  • gpg-zip - encrypt or sign files into an archive
  • leave - Le recuerda cuando tiene que irse