Linux notes

Convert images to a PDF file:

sudo apt install img2pdf # If not installed already
img2pdf im1.png im2.jpg -o out.pdf

Source: https://stackoverflow.com/a/8955457/526189

Convert images

sudo apt-get install imagemagick
convert source.png dest.jpg

Source: https://askubuntu.com/a/13825/118883

Copy ISO image to USB drive

dd if=/path/to/your/isofile of=/your/usb/disk bs=8M status=progress

Source: https://superuser.com/a/351815/101527

Convert PDF files to text files

sudo apt install poppler-utils

pdftotext input.pdf output.txt

Sources: cyberciti, linuxuprising

Colored cat

alias ccat='highlight -O ansi --force'

ccat file

Source: https://stackoverflow.com/a/27501509/526189

Bash – get file name and extension

filename=$(basename -- "$fullfile")
extension="${filename##*.}"
filename="${filename%.*}"

Source: https://stackoverflow.com/a/965072/526189


Posted

in

, ,

by

Tags: