This is a collection of handy commands for Linux in one page for easy reference. This is a placeholder as more information about Linux will be coming to this web address.
This helps to save bandwidth when sharing your materials online. This produces the best zip files, but if you know the recipient has 7-Zip, you can usually make even smaller archives by using the 7z format instead of zip.
7z -mm=Deflate -mfb=258 -mpass=15 -r a myarchive.zip myfile.txt
You can pre-compress files for sending by your web server like this.
gzip -9fk *.js *.css *.htm*
Requires gzip_static on; in location / {} in your /etc/nginx/sites-available/default
ln -s filename.ext linkname
Very annoying when the mouse pretends you're scrolling when you're not.
synclient CoastingSpeed=0
This is not case sensitive.
find /media/ -iname "*butt*"
Not case sensitive. Errors are discarded.
find / -iname "*butt*" 2> /dev/null
wget -nd -H -p -A jpg,jpeg,png,gif,webp -e robots=off https://web.site/page
Page-pic-snarfing for fun and profit.
See if privacy is compromised by photos shared.
gm identify -verbose *.jp*g
pkill gimp*
Could result in corruption somewhere, but the thing is too annoying.
killall file-roller
Lately, I just use Alt-F4 twice to avoid having to use the mouse to click two buttons to close the damned thing.
rsync -cav /source/folder/ /destination/folder/
ignores whitespace
diff -b file1.txt file2.txt
Extracts a scene starting at 1:05:30 and running for 18 seconds.
ffmpeg -ss 1:05:30 -i MyVid.mts -t 00:00:18 -vcodec copy -acodec copy MyScene.mts
file MySong.mp3
identify favicon.ico
ffprobe -hide_banner MySong.mp3
ffmpeg -i MySong.mp3 -af volumedetect -vn -f null - 2>&1 | grep "volume:"
Doing these in one step can save time and help avoid loss of quality. Adjust the values for start_silence to leave a bit of silence at the beginning and end of the audio file.
The window will not behave normally while frozen.
killall -STOP firefox
killall -CONT firefox
renice 10 $(pgrep firefox)
pngcrush -brute -reduce in.png out.png
pdftocairo -png -singlefile -scale-to-x 400 MyDocument.pdf
printenv
service --status-all
netstat -np
©2021-2025 Ron Spain