What's changed: Initial version
4.4Operations and practice
Covers the basic bash commands used in deployment/operations (file/directory ops—ls/cd/pwd/mkdir/cp/mv/rm/cat, and environment variables export/env) as reading "what this command sequence does," and the DevOps principles (culture, automation, measurement, sharing) as the judgment of "why this practice creates value."
Automation scripts and CI jobs ultimately run on a shell (bash). So reading precisely "what this command sequence does" is basic fitness for deployment and operations. At the same time, DevOps is not a particular tool name but the culture and practice of breaking down the wall between development and operations to deliver fast and safely through automation and measurement. This section organizes basic bash operations and environment-variable handling as reading, and DevOps principles as the judgment of "why they create value."
4.4.1File and directory operations
- Where am I and what is here:
pwd(print the current directory),ls(list contents,ls -lfor detail,ls -ato include hidden files),cd path(move,cd ..goes up one). Mistaking where you are shifts how relative paths resolve, so it is safe to check your location withpwdfirst. - Create, copy, move, delete:
mkdir dir(make a directory,mkdir -p a/b/ccreates parents too),cp src dst(copy,cp -rfor directories),mv src dst(move or rename),rm file(delete,rm -r dirrecursively).cat fileprints a file's contents.rm -ris irreversible, so confirm the target before running it.
Continue reading — free sign-up
You're reading the free preview. Sign up free to read this section in full, plus every chapter (including 4+) and all questions.

