Series · 10 parts
Command Line cho Developer - Commands, Bash Script & Workflow
Series tiếng Việt dạng handbook/cookbook cho developer làm việc trong terminal mỗi ngày: điều hướng file, đọc log, tìm code với rg/find, pipe và redirection, Git workflow, curl+jq để debug API, process/port/network debugging, Node package manager, Docker/SSH, và cách gom tất cả thành bash script tự động hóa an toàn.
-
Nền tảng terminal cho developer: prompt, cwd, command/args/flags, exit code, path, ls/cd/pwd, tạo-di chuyển-copy-xóa file, shortcut và bài tập.
-
Các lệnh đọc file và log hằng ngày: cat, less, head, tail -f, wc, file, du, df, sort, uniq, cut, diff và cách inspect output không mở editor.
-
Tìm kiếm codebase như senior: rg cho nội dung, find/fd cho file, glob/exclude, context lines, file list, null separator và recipe tìm config/TODO/symbol.
-
Ghép command thành workflow: stdin/stdout/stderr, pipe, >, >>, 2>, tee, command substitution, xargs, while read và pattern xử lý file hàng loạt an toàn.
-
Git CLI hằng ngày cho developer: status, diff, add -p, commit, log, branch/switch, stash, restore, rebase/pull, review trước khi push và rollback an toàn.
-
Debug HTTP API bằng terminal: curl GET/POST, headers, auth, status code, redirects, timeout, verbose mode, lưu response và jq để đọc/lọc JSON.
-
Debug máy dev bằng CLI: ps, pgrep, kill, lsof, ss/netstat, nc, top/htop, env, PATH, command -v, df/du và recipe xử lý port bị chiếm.
-
Workflow Node/package manager trong terminal: node/npm/pnpm version, corepack, npm run, pnpm exec/dlx, npm ci, frozen lockfile, env vars, npm ls và pnpm why.
-
Command line cho môi trường thật: ssh config, scp, rsync, tail log remote, docker ps/logs/exec/cp/stats, compose up/logs/exec/down và checklist debug container.
-
Capstone command line: khi nào viết script, template bash an toàn, strict mode, trap cleanup, require_cmd, dry-run, parse args đơn giản và project doctor script.