Affichage des articles dont le libellé est commandline. Afficher tous les articles
Affichage des articles dont le libellé est commandline. Afficher tous les articles

dimanche 27 janvier 2013

PDF reduce size of file


Pour réduire la taille d'un pdf, en utilisant ghostscript :

gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=OUT.pdf CV.pdf
 
 
Source : http://www.fiat-tux.fr/fr/2010/12/reduire-la-taille-dun-pdf/ 

jeudi 12 juillet 2012

Nettoyer les metadonnées d'images

j'ai pour cela trouvé jhead :
jhead -purejpg [img.jpg]
jhead is used to display and manipulate data contained in the Exif header of JPEG images from digital cameras. By default, jhead displays the more useful camera settings from the file in a user-friendly for‐ mat. jhead can also be used to manipulate some aspects of the image relating to JPEG and Exif headers, such as changing the internal timestamps, removing the thumbnail, or transferring Exif headers back into edited images after graphical editors deleted the Exif header. jhead can also be used to launch other programs, similar in style to the UNIX find command, but much simpler.

Command(s) of the day

Some colleagues started putting commands on the white-board every X days under
  • comm compare two sorted files line by line
  • paste merge lines of files
  • colordiff diff, with colors
  • colorgcc
  • pgrep look for a process name
  • pkill kill processes by name, not by pid
  • ...

jeudi 16 février 2012

signaux et terminaux, stty

A la base, une simple question de la part d'une collègue : comment envoyer un SIGQUIT dans un terminal sous mac OS.
Une rapide recherche sur le net donne comme réponse "^\", contrairement à linux où c'est usuellement "^d" qui sert à cela.

Comment configurer cela, comment trouver cela ?


STTY(1)                          User Commands                         STTY(1)
NAME
       stty - change and print terminal line settings

SYNOPSIS
       stty [-F DEVICE | --file=DEVICE] [SETTING]...
       stty [-F DEVICE | --file=DEVICE] [-a|--all]
       stty [-F DEVICE | --file=DEVICE] [-g|--save]

DESCRIPTION
       Print or change terminal characteristics.

Qui chez moi par exemple (Ubuntu) me donne :
 
$ stty -a
speed 38400 baud; rows 40; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?; eol2 = M-^?;
swtch = M-^?; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc ixany imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt 
Donc en fait "^d" envoie un "eof", pas un sig_quit...

mercredi 4 mars 2009

commandlinefu

Fantastique !

http://www.commandlinefu.com

c'était un peu l'idée de ce blog au départ, bien que cela ait un peu dévié...

En se retrouve sur ce site avec un équivalent twitter, mais uniquement pour des lignes de commande !

exemple, cette commande que j'avais eu l'occasion de chercher un jour pour une vidéo prise avec mon appareil photo...
mencoder -vf rotate=1 -ovc lavc -oac copy "$1" -o "$1"-rot.avi