Various commands.

trash-restore filename

Restoring deleted files

pdfunite file01.pdf file02.pdf output.pdf

Combine two pdfs to one

youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' video_URL

Downloading a video in best quality

youtube-dl -x --audio-format mp3 video_URL

Download audio only

command | more

Paging long-scrolling output

sed -i "s/$OLD/$NEW/g" *.txt

Replace string in multiple files

whereis applicationname

Find the location of an application

for file in *; do mv "$file" echo $file | tr ' ' '_' | tr '[:upper:]' '[:lower:]' ; done

Change all filenames to lowercase and replace all spaces with underscores in a directory:

xclip -selection clipboard -t image/png -i example.png

Copy an image to the clipboard

date --date='TZ="Continent/City" localTZTime Date/Day'

Print local time of a date and time in a different timezone

tzselect

Find the available timezones

for f in *.zip; do unzip "$f" -d "${f%.zip}"; done

Extract all .zip files in folder creating a new director with the name of the file for each

Debian Packages

Install .deb files

sudo dpkg --install packagename.deb

List installed dpkg packages sorted by size

dpkg-query --show --showformat='${Package;-50}\t${Installed-Size}\n' | sort -k 2 -n | grep -v deinstall | awk '{printf "%.3f MB \t %s\n", $2/(1024), $1}'

Clearing System Logs

journalctl --disk-usage
journalctl --rotate
sudo journalctl --vacuum-files=5

Set SystemMaxUse=100M in /etc/systemd/journald.conf to limit maximum journaling space.

Use systemctl daemon-reload to update.

For printing commands, see printer.

chmod

Permission control on who can access files, search directories and run scripts.

cmus

A command line music player.

ffmpeg

Commonly used commands to edit videos.

gemini

A simple protocol for serving content over the internet.

git

Notes on the version control system

imagemagick

Commmonly used imagemagick commands.

launcher

How to add any file to the application launcher.

neomutt

A command line based e-mail client

pass

A command line password manager.

resilio sync

Peer to peer file syncing

rsync

Battle tested file synchronisation.

stardict

A command line dictionary.

tarballs

A container archive.

w3m

Notes on the command line browser.