abcde – Text-mode CD ripper

aha – convert ANSI color to HTML
tldr ffmpeg | aha > ffmpeg.html
Alpine for Usenet/email
an
Anagram Generator
an -w -m 8 teresita
Print anagrams with a minimum of three characters using a local dictionary:
an -m 3 -d words.txt teresita
apg
Create a password with at least one symbol, one number, one uppercase letter and one lowercase letter (and if that doesn’t work try adding one incantation to Satan)
$ apg -M SNCL
^ogNifsec8
rivrag5Og:
Mav0Grag.
Ill8druv`
3}Wrepyels
.frevMeeg0
apt
List all installed software:
apt list –installed | cut -d”/” -f1 | uniq
cdw – Text-based console equivalent to popular Linux disk-burning software like Xfburn or Brasero. It is an Ncurses front-end for cdrecord/wodim, mkisofs/genisoimage, growisofs, dvd+rw-mediainfo, dvd+rw-format, xorriso, and mkudffs.
col
Read a man page in the terminal minus the “helpful” user interface
man genisoimage | col -b | less
column
Print comma-separated values as columnized data:
column starsc.csv -t -s “,”
concalc
Weather report in the console, any time: $ curl wttr.in/seattle
cut
Select the first five fields of a file, using space as a delimiter
cat stars.txt | cut -d ‘ ‘ -f 1-5
ddir
Display directory tree:
ddir -d
dfc – View information on mounted devices
dict – command-line dictionary
dirsplit
Split a directory full of files into volumes small enough to burn to CD, while minimizing wasted space
dirsplit -m -s 650M loops
ditaa – convert ASCII art to graphical diagrams
ebook-convert
Convert ebooks from one format to another
ebook-convert ‘Rogue Planet – Greg Bear.azw3’ Rogue-Planet.epub
egrep
Frequency count of ending letters in words of 2 or more characters
for i in {a..z} ; do printf “$i ” ; look . | egrep “.$i$” | wc -l ; done | sort -k2nr
enchant
Print the words from Homer’s “Illiad” that don’t appear in the dictionary
enchant -l illiad.txt | sort | uniq
fc-list
List all installed fonts, names only
fc-list | sed ‘s/^[^ ]* //’ | sed ‘s/\:.*//’ | sort | uniq
List the shell scripts in your /usr/bin directory:
find /usr/bin -name “*” -exec file {} \; | grep “text executable” | sort
ffmpeg
Convert frames from a video or GIF into individual numbered images
ffmpeg -i bones-kirk.mp4 frame_%d.jpg
ffmpeg
Extract frame 120 from a video to a jpg
ffmpeg -i trek.mp4 -vf “select=eq(n\,120)” -vframes 1 trek.jpg
Play Conway’s Game of Life
ffplay -f lavfi -i life=s=400×300:mold=10:r=30:ratio=0.1:death_color=#C83232:life_color=#00ff00,scale=1200:800:flags=32
file
Print information about the files in a directory:
find -name “*” -exec file {} \;
fmt
Simple optimal text formatter:
fmt gettysburg.txt
FTP
You can surf FTP (older than the World Wide Web) with Midnight Commander, built right in. Linux geeks feel like they’re in Willie Wonka’s chocolate factory.
genisoimage
Burn data from the temp directory to CD with one command
genisoimage -r -joliet-long -o hold1.iso hold ; wodim -eject -tao speed=0 dev=/dev/sr0 -v -data hold1.iso
Scale and merge two GIFs:
- gifsicle –resize 500×375 -i dewey.gif > huey.gif
- gifsicle –colors 256 –merge huey.gif cylon.gif -o robots.gif
grep
Find non-text files
grep -iR -m 1 ” ” | grep “Binary file”
gs
Extract pages from a PDF file
gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -dSAFER -dFirstPage=34 -dLastPage=34 -sOutputFile=test2.pdf The-Cambridge-Handbook-of-Physics-Formulas.pdf
history
Your top 25 commands
history | awk ‘{print $2}’ | sort | uniq -c | sort -n | tail -n25 | sort -nr
inxi – System infomation
inxi -Fz
irssi – text mode IRC client
Print information about the files contained within an ISO file
isoinfo -l -i xp.iso
Convert an image to ASCII
jp2a ruby.jpg
links
text mode web browser
look
maim
Take a screenshot
maim –select snap1.png
Print a list of words that begin with string
$ look intra
intractability
intractability's
intractable
intramural
intranet
intranet's
intranets
intransigence
intransigence's
intransigent
intransigent's
intransigents
intransitive
intransitive's
intransitively
intransitives
intravenous
intravenous's
intravenouses
intravenously
lynx
Batch convert all HTML files in a directory to text files
#!/bin/bash for i in *.html do lynx --dump "$i" > "${i%%.*}.txt" done
madplay
Attenuate an MP3 by 3dB and write out to a WAV file:
madplay -a3 03-Fm-Delight.mp3 -o FM-Delight.wav
maim | Take a screenshot | maim –select snap1.png |
make
Compile and install software old-school, from downloaded source code
tar -xvf joe-4.6.tar.gz cd joe-4.6 ./configure make sudo make install
matrix
while :;do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(printf “\U$(($RANDOM % 500))”);sleep 0.05;done|gawk ‘{a[$3]=0;for (x in a){o=a[x];a[x]=a[x]+1;printf “\033[%s;%sH\033[2;32m%s”,o,x,$4;printf “\033[%s;%sH\033[1;37m%s\033[0;0H”,a[x],x,$4;if (a[x] >= $1){a[x]=0;} }}’
mc – Dual pane file manager
Midnight Commander has built-in FTP (File Transfer Protocol) support, which is good, because Firefox and Chrome kicked it to the curb.
mlr
Sort a large catalogue of stars in .csv format by name
mlr –icsv –opprint sort -f ProperName hygfull.csv
mogrify
Convert png files to jpg:
mogrify -format jpg *.png
montage
Tile images into a grid, automatically calculating the grid cell size from the largest image:
montage *.jpg -geometry +0 +0 result.jpg
The Unix tool called more lets you browse text files but you can’t go backwards so there’s another tool called less that has more options, on the theory that less is more. Now there’s still another tool called most that has even more features than less! I’m holding out for least.
ncdu – ncurses disk usage
Interactive. See at a glance which directories have the most shit, which are empty, and the all symbolic links to other directories.
nl
Find and count all Bible verses too long to tweet
cat kjv.txt | awk ‘length > 280’ | nl
nl
Add line numbers to a file (5 digits, leading zeros, separated by a colon):
nl -i1 -s’: ‘ -nrz -w5 20211219.txt >20211219a.txt
nvlc
Ncurses terminal-based VLC interface:
nvlc '06 - Blue Stone Feat. Sheyenne Rivers - Substitute For Love.mp3'
oggenc
Use Vorbis Tools to convert a .WAV file to .ogg format
oggenc the-rhodes.violin.wav
oysttyer
Twitter from the terminal
Palindromic dates
#!/bin/bash ispal() { date -d "$1" 1>/dev/null 2>&1 && echo "$1" ; } for _H in {2..9}; do for _I in {0..9}; do for _J in {0..99}; do ispal ${_H}${_I}`printf "%02d%s" ${_J}`-`printf "%02d%s" ${_J} | rev`-`printf "%02d%s" ${_H}${_I} | rev` done done done
pi
Compute 4000 digits of pi
git clone https://github.com/lunasorcery/pridecat.git
cd pridecat
make && make install
ps
Find the processes which are your biggest memory hogs:
ps aux –sort=+\%mem | awk ‘{print $2,”\t”,$4,”%\t”,$11}’
Convert text data to sc spreadsheets
cat nearby.csv | psc -d, >nearby.sc
pstree
Display processes as a tree and do not truncate long lines
pstree -l
Replace whitespace in file names with underscores:
rename 's/\s+/_/g' *
rig
Print contact information for ten imaginary people
rig -c 10
sc – text-based spreadsheets
Scrot
Interactive screenshot (with mouse)
scrot -s
setxkbmap
Avoid fat finger in #vim, turn the capslock key into a second escape key:
setxkbmap -option caps:escape
showcolor
Ever want to quickly see a hex color value from the command line? Try using ImageMagick display and making a easy to use function to call it.
showcolor() { display -size 400x400 xc:"#${1}"; }
showcolor 6823AF
shuf
Print 30 random numbers in the range of 1-1000
shuf –head-count=30 –input-range=1-100
strings
Convert Wordstar-formatted files to text
strings -a -n 1 apollo.007 | sed -e :a -e ‘$!N;s/\n/ /;ta’ > apollo007.txt
Extract the plain text that exists inside compiled binaries (using the MS-DOS 7.1 commaAnd-line shell in this example)
tar
Extract gzip compressed tar archives:
gunzip progs.tar.gz
tar xvf progs.tar
TermFeed – RSS feed reader for the terminal, written in Python
Create one hundred empty files:
touch file{00..99}.txt
tr
Build a list of all the words in a file:
tr ‘ ‘ \\n < gettysburg.txt | sort | uniq
tree
List contents of directories in a tree-like format
tree
units
The speed of light is 1,802,617,499,785.25 furlongs per fortnight.
unrar
Unpacking rar’d binaries pulled down from Usenet:
Issue unrar x against part01.rar
whatis
Get a one-line description for all the files in a directory, delete lines that have no description:
ls -l /usr/bin | awk ‘{print $9}’ | xargs whatis | sed ‘/appropriate/d’
wodim
Burn ISO to disk
wodim -eject -tao speed=0 dev=/dev/sr0 -v -data files1.iso
xargs
Calculate Easter for a range of years
$ seq 1990 2030 | xargs -i ncal -e {}
04/15/1990
03/31/1991
04/19/1992
04/11/1993
04/03/1994
04/16/1995
04/07/1996
03/30/1997
04/12/1998
04/04/1999
04/23/2000
04/15/2001
03/31/2002
04/20/2003
04/11/2004
03/27/2005
04/16/2006
04/08/2007
03/23/2008
04/12/2009
04/04/2010
04/24/2011
04/08/2012
03/31/2013
04/20/2014
04/05/2015
03/27/2016
04/16/2017
04/01/2018
04/21/2019
04/12/2020
04/04/2021
04/17/2022
04/09/2023
03/31/2024
04/20/2025
04/05/2026
03/28/2027
04/16/2028
04/01/2029
04/21/2030
xrandr
Print the current state of the display system:
xrandr –query