These are misc useful commands using linux command line

spliting and combing PDF Link to heading

pdfseparate -f 1  original.pdf  output-page%d.pdf
qpdf --empty --pages `cat l` -- all.pdf

HP printer Link to heading

These are some commands to document hplip linux HP printer utils.

sudo apt install hplip-gui hplip
hp-scan

Network manager Link to heading

nmcli

Bluetooth Link to heading

bluetoothctl
agent on
scan on  # wait for your device's address to show up here
scan off
trust MAC_ADDRESS
pair MAC_ADDRRESS
connect MAC_ADDRESS

Fresh linux essentials Link to heading

sudo apt install htop ripgrep vim ncdu python3-virtualenv acpi

Reduce desk space Link to heading

These few things to do to reduce the file system usage.

 sudo apt install localepurge
 sudo apt autoremove
 sudo apt autoclean

remove venv

find . -type d -name venv -exec rm -rf {} \;
find . -type d -name .venv -exec rm -rf {} \;

use ncdu to hunt down big folders on root

ncdu -rx /

delete .cache

rm ~/.cache/* -rf
dpkg-query -Wf '${Installed-size}\t${Package}\n' | column -t

Image and pdf manipulation Link to heading

Combine JPG to PDF

convert -append doc.1.JPG doc.2.JPG doc.combined.pdf

Compress pdf to smaller than 2MB

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook  -dNOPAUSE -dQUIET -dBATCH -sOutputFile=doc.compressed.pdf doc.compressed.pdf

Separate PDF

pdfseparate -f 1  doc.pdf doc.separated.%d.pdf