Articles

All my command lines

Here is a collection of commands lines, code and configuration snippets I collected for several years while working as an Open-Source Software Engineer: Files Management  Archives System & Shell  Network  Hardware  Apache  Web  Video  Audio Image Processing Text, Date & Document Processing dpkg, APT & Aptitude RPM, Urpmi & Yum  OpenSSH GPG & OpenSSL i18n …
➟ Read more

Image Processing commands

Conversion Convert several files from a format to another: 1$ convert img_*.bmp img_%04d.png Resize Resize images of the current folder to progressive jpeg. Resized images will not be greater than 600x600, but the aspect ratio will be respected: 1$ convert -resize 600x600 -sharpen 1 -interlace Line ./* ./pict …
➟ Read more

PDF commands

Case-insensitive search of a string in a PDF, thanks to pdfgrep  : 1$ pdfgrep --page-number --ignore-case 'my_string' ./document.pdf Convert a PDF to a JPEG file at 150 dpi: 1$ convert -density 150 ./document.pdf ./document.jpg Extract images from a PDF document: 1$ pdfimages -j document.pdf prefix Compile all …
➟ Read more

Text, Date & Document processing commands

Search Count the number of lines with at least one occurrence of the y character: 1$ cat test.txt 2asd dd :; > 3y YYYyy yyy 4 . 5 6asdkjlyes 7 kjkjhkjhy 8 9$ grep -o '.*y.*' ./test.txt | wc -l 103 Replace Text replacement: 1$ sed 's/string …
➟ Read more

Hardware commands

Computer Get Mac hardware model: 1$ sudo dmidecode -s system-product-name 2MacBookAir5,2 Disk Show all S.M.A.R.T. info of a disk: 1$ smartctl -a /dev/ada4 Low-level format of the hda device: 1$ dd if=/dev/zero of=/dev/hda Same as above but for paranoΓ―d …
➟ Read more