SRK's UNIX Tool Chest
Unix is an incredible operating system. The philosophy was inverted
(for its time): provide basic utilities, a simple structure (everything
is a file) and simple interfaces (e.g. a file is records with \n
and that is it) and then let users develop comples packages. Herewith
find SOLUTIONS for "real life" problems
undertaken with Unix. In order to get motivated you may want to
first check out some handy tools
first.
Unix Commands
- file Determine type of file
notes
- cp copy files (for future tools)
notes
- cat output lines sequentially
notes
- ls list directory
notes
- echo print line
notes
- wc Count the number of lines, words, characters
notes
- head Display lines at the start of the file
notes
- tail Display lines at the bottom of the file & nbsp
notes
- kill kill bash prorcess
notes
- tee Write to file and to terminal
notes
- {} (brace expansion) Generate numerical
or alphabetic sequence
notes
- nl Number lines of existing files
notes
- seq Generate alpha-numeric sequences
notes
- jot random numbers & alphanumeric sequences
notes
- quirky shuf,rev,tac,look,yes,sl,cowsay,figlet
notes
- cut Extract characters and fields
notes
- comm find lines common to two (sorted) files
notes
- xargs Feed argument list to a utility
notes
- tr translate (substitute, delete, squeeze)
notes
- sort sort columns
notes
- uniq identify unique lines in a file, also histogram
notes
- pr Pagination, column to matrix, merging files
notes
- column columnar display
notes
- paste Paste columns side by side
notes
- join Join two files on common (sorted) key
notes
- find find files
notes
- od octal dump of file
notes
Tools
- blanklines Deleting blank lines
notes
- quick information, quickly
notes
- iconv get rid of non-ASCII characters
notes
- textutil convert text files (txt,doc,htm...)
notes
- convertconvert image formats (png,pdf,jpg)
notes
- pdf utilities
pdftk |
pdftotext |
pdf suite
- jq JSON query
notes
- csvkit tools for csv files
notes
-
ffmpeg video file editor
notes |
link
-
repairing fits files
notes
bash
Like any other language bash is best learnt by homework whose solutions
are inpsired by prior examples. I found this
site
thoughtfully constructed. Bookmark this
website. The more you learn about bash the more useful this
manual becomes.
grep |
sed |
awk
Facilities
Cheat sheets
Linux 101 Hacks
(fruitful way to send a lazy afternoon)
Guru99 (tutorial well suited to beginners; well laid out)
Sanfoundary (well organized)
Geek Stuff
Gems here and there
Unix School (thoughtful examples with
step-by-step explanation; need to browse, though)
Geek for geeks
Search for unix commands e.g. "zip command"
Blog: Unknown
Attending a meeting. Utterly bored? Challenge yourself to see
whether you can write the fewest characters one liner