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.


SRK Command-line tools


Unix Commands

  1. file Determine type of file   notes
  2. cp copy files (for future tools)   notes
  3. cat output lines sequentially   notes
  4. ls list directory   notes
  5. echo print line   notes
  6. wc Count the number of lines, words, characters   notes
  7. head Display lines at the start of the file   notes
  8. tail Display lines at the bottom of the file & nbsp notes
  9. kill kill bash prorcess   notes
  10. tee Write to file and to terminal   notes
  11. {} (brace expansion) Generate numerical or alphabetic sequence   notes
  12. nl Number lines of existing files   notes
  13. seq Generate alpha-numeric sequences   notes
  14. jot random numbers & alphanumeric sequences   notes
  15. quirky shuf,rev,tac,look,yes,sl,cowsay,figlet   notes
  16. cut Extract characters and fields   notes
  17. comm find lines common to two (sorted) files   notes
  18. xargs Feed argument list to a utility   notes
  19. tr translate (substitute, delete, squeeze)   notes
  20. sort sort columns   notes
  21. uniq identify unique lines in a file, also histogram   notes
  22. pr Pagination, column to matrix, merging files   notes
  23. column columnar display   notes
  24. paste Paste columns side by side   notes
  25. join Join two files on common (sorted) key   notes
  26. find find files   notes
  27. od octal dump of file   notes

Tools

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