Linux/Unix: Misc. & Learning Resources β Shell Tricks, Cheat Sheets & More
Introduction β Boost Productivity with Hidden Shell Features & Smart Learning Tools
Learning Linux goes beyond basic commands. Many power featuresβlike globbing, brace expansion, and well-curated cheat sheetsβmake working in the terminal faster and more efficient. Coupled with the right reading resources and handy tools, you’ll quickly move from beginner to proficient.
In this guide, youβll learn:
- How to use powerful shell expansions like globbing and braces
- Where to find fast-reference cheat sheets
- What curated tools and books can support your Linux mastery
Topics Covered
| Category | Description |
|---|---|
| Advanced Shell Features | Master filename wildcards, brace expansions, and quoting tricks |
| Cheat Sheets & Quick References | Access printable, searchable, and categorized Linux references |
| Selected Reading & Useful Tools | Books, online tutorials, and tools to continue your Linux journey |
Linux/Unix: Advanced Shell Features
Globbing (Filename Wildcards)
| Pattern | Description | Example |
|---|---|---|
* | Matches any number of characters | ls *.txt |
? | Matches a single character | ls file?.txt |
[abc] | Matches one of listed characters | ls file[123].txt |
[a-z] | Matches character range | ls file[a-f].txt |
Globbing is used heavily in bash to match files/directories using patterns.
Brace Expansion
echo file{1,2,3}.txt
Expands to: file1.txt file2.txt file3.txt
Another example:
mkdir {2022..2025}/project{A,B}
Creates nested folder structures quickly.
Command Substitution & Arithmetic Expansion
echo "Today is $(date)"
echo $((3 * 5))
Insert output of a command or perform inline arithmetic.
Linux/Unix: Cheat Sheets & Quick References
Online Cheat Sheets
| Resource | Highlights |
|---|---|
| Cheatography | Bash, sed, awk, regex, systemd, etc. |
| OverAPI | CLI reference portal |
| ExplainShell | Breaks down shell command syntax in detail |
| GitHub Gists | Search for community-contributed shell tips |
Printable Quick Sheets
Look for PDFs covering:
- Bash scripting
- Common commands (
ls,find,grep,awk, etc.) - File permissions and redirections
- Package management shortcuts
Linux/Unix: Selected Reading & Useful Tools
Recommended Books
| Title | Why It’s Great |
|---|---|
| The Linux Command Line β Shotts | Clear, hands-on guide from beginner to advanced |
| How Linux Works β Ward | System internals, processes, boot sequence, etc. |
| UNIX Power Tools | Covers tips, hacks, and deeper scripting |
Online Resources & Tools
- TLDR Pages β Simple explanations for commands:
tldr tar - Bash ShellCheck β Online tool to detect syntax errors:
https://www.shellcheck.net - Linux Journey β https://linuxjourney.com: Beginner to advanced online lessons.
Summary β Recap & Next Steps
The path to Linux mastery includes powerful shell features, quick references, and learning materials that expand your capabilities. Understanding brace/glob expansions, using cheat sheets, and following expert resources makes your terminal experience both productive and enjoyable.
Key Takeaways:
- Use globbing patterns to match files easily (
*,?,[ ]) - Create multiple directories/files with brace expansion
- Bookmark cheat sheets and online tools for quicker scripting
- Read practical Linux books and use TLDR/ShellCheck for help
Real-World Applications:
- Auto-generate directory structures for automation
- Quickly locate commands youβve forgotten
- Write scripts more efficiently with fewer syntax errors
Frequently Asked Questions
Whatβs the difference between globbing and regex?
Globbing is simpler and used for file path matching in shells (*, ?), while regex is used in tools like grep or sed for pattern matching.
How do I use brace expansion in scripts?
Use:
for file in file{1..3}.txt; do touch "$file"; done
Creates file1.txt, file2.txt, file3.txt.
Where can I find TLDR pages?
Visit https://tldr.sh or install it with:
sudo npm install -g tldr
Is ShellCheck reliable for production scripts?
Yes! It detects common scripting issues and even explains fixes. Use it during script development for better code hygiene.
Share Now :
