Javier Barber
Senior Sysadmin Freelancer
All posts by Javier
CONFIGURACIÓN DE MÁS ESPACIO SWAP EN LINUX
# swapoff -a Creamos una partición de tipo SWAP con parted: (parted) mkpart primaria linux-swap 1 2048Mb # mkswap /dev/particion_creada_antes (Configura un dispositivo para ser espacio swap) Añadimos la siguiente linea al fstab: /dev/particion_creada_antes swap swap defaults 0 0 # swapon -va Para testear la swap: # cat /proc/swaps # free
MANEJO FICHEROS .WAR
Ver el contenido de un fichero .war: $ jar -tvf RemotingGalleryServer.war Extracción de un fichero determinado de un .war: $ jar xf RemotingGalleryServer.war WEB-INF/classes/app.properties Actualización de un fichero .war para añadirle otro fichero: $ jar uf RemotingGalleryServer.war WEB-INF/classes/app.properties
TUNEL MEDIANTE SSH
#ssh -vvv -L puerto_tunel:IP_Tunel:puerto_destino IP_destino #ssh -vvv -L 80:172.22.44.108:80 172.22.44.106 La conexión se realizará posteriormente a http://localhost
SOBRE EL INSTALADOR DE PAQUETES YUM
# yum check-update – Muestra paquetes que se pueden actualizar (apt-get update) # yum update – Actualiza los paquetes. (apt-get upgrade) # yum remove o yum erase – Elimina paquetes y sus dependencias (apt-get remove) # yum list – Lista los paquetes disponibles (apt-cache search) # yum list installed – Lista los paquetes instalados (dpkg…
MONTAR IMAGEN .NRG (NERO)
# mount -t iso9660 -o loop,offset=307200 imagen.nrg /media/imagen
CONVERTIR VIDEO A FORMATO IPHONE
$ffmpeg -y -i video.ogm -vcodec mpeg4 -acodec aac -b 987k -s 480×288 video.mp4
TRATAMIENTO DE FICHEROS
Renombrar todos los ficheros de un directorio pasándolos a mayúsculas $rename ‘y/a-z/A-Z/’ * Cambiar la extensión de todos los ficheros de un directorio de .jpg a .THM: $for file in *.JPG; do mv ${file} ${file/.JPG/.THM}; done
URL PARA CONEXION A SERVIDOR CUPS LOCAL
http://localhost:631
CONVERTIR UN VIDEO A UNA RESOLUCIÓN DETERMINADA
$ffmpeg -i video.avi -f psp -s 480×272 -b 1200k -ar 48000 -ab 384k video.avi
CONVERSIÓN DE IMÁGENES
Convertir imágenes de un directorio a un tamaño menor: $for i in $( ls ); do convert -resize 800 $i $i; done Reducir la calidad de todas las fotos de un fichero a un 80%: $for i in *.JPG; do convert -quality 80% $i $i; done Redimensionar a un 80% del tamaño todas las fotos…