bash-linux
Bash/Linux terminal patterns. Critical commands, piping, error handling, scripting. Use when working on macOS or Linux systems.
Bash Linux Patterns
Essential patterns for Bash on Linux/macOS.
1. Operator Syntax
Chaining Commands
| Operator | Meaning | Example | ||||
|---|---|---|---|---|---|---|
; | Run sequentially | cmd1; cmd2 | ||||
&& | Run if previous succeeded | npm install && npm run dev | ||||
| `\ | \ | ` | Run if previous failed | `npm test \ | \ | echo "Tests failed"` |
| `\ | ` | Pipe output | `ls \ | grep ".js"` |
2. File Operations
Essential Commands
| Task | Command |
|---|---|
| List all | ls -la |
| Find files | find . -name "*.js" -type f |
| File content | cat file.txt |
| First N lines | head -n 20 file.txt |
| Last N lines | tail -n 20 file.txt |
| Follow log | tail -f log.txt |
| Search in files | grep -r "pattern" --include="*.js" |
| File size | du -sh * |
| Disk usage | df -h |
3. Process Management
| Task | Command | |
|---|---|---|
| List processes | ps aux | |
| Find by name | `ps aux \ | grep node` |
| Kill by PID | kill -9 <PID> | |
| Find port user | lsof -i :3000 | |
| Kill port | kill -9 $(lsof -t -i :3000) | |
| Background | npm run dev & | |
| Jobs | jobs -l | |
| Bring to front | fg %1 |
4. Text Processing
Core Tools
| Tool | Purpose | Example |
|---|---|---|
grep | Search | grep -rn "TODO" src/ |
sed | Replace | sed -i 's/old/new/g' file.txt |
awk | Extrac |
Subscribers only
The full skill, its 1 bundled files and every download is included with every paid Complete AI plan.
Details
| Source | community |
|---|---|
| License | — |
| Risk label | critical ("critical" means the skill may run commands or touch files — read before use) |
| Files | SKILL.md |
| Added | 2026-02-27 |
Related skills
agent-harness-fault-injection
Use when an agent workflow needs deterministic recovery evidence for sandbox, MCP/tool, worker, checkpoint, memory, or orchestration failures.
agents-md
Create, revise, or audit AGENTS.md files from repository evidence, verified commands, and correctly scoped instructions without overwriting maintainer intent.
agenttrace-session-audit
Audit local AI coding-agent sessions with agenttrace for cost, tool failures, latency, anomalies, health, diffs, and CI gates.
api-endpoint-builder
Builds production-ready REST API endpoints with validation, error handling, authentication, and documentation. Follows best practices for security and scalability.
api-rate-limit-handler
Implement bounded, idempotency-aware API throttling, backoff, and retry handling for 429 and transient 5xx responses.
arm-cortex-expert
Senior embedded software engineer specializing in firmware and driver development for ARM Cortex-M microcontrollers (Teensy, STM32, nRF52, SAMD).
