Flashcard Deck · 20 cards · Public

Linux Command Line & Bash Automation

Master essential Linux command line operations and Bash automation with this high-yield flashcard deck. Cover file permissions, process control, text processing with grep/sed/awk, and Bash scripting fundamentals.

Cards in this deck

(20 cards)

Preview terms and definitions before starting your study session.

#1
Term
Numeric Permission Modes (chmod 755)
Definition
Sets permissions using octal notation for User, Group, and Others:
  • Read (r) = 4
  • Write (w) = 2
  • Execute (x) = 1
755 represents 7 (4+2+1=rwx) for owner, 5 (4+0+1=r-x) for group, and 5 (4+0+1=r-x) for others.
#2
Term
Octal Representation: 644
Definition
Calculates permissions as:
  • User: 6 (4+2+0 = rw-)
  • Group: 4 (4+0+0 = r--)
  • Others: 4 (4+0+0 = r--)
This is the standard permission for public/readable files.
#3
Term
Changing Ownership (chown)
Definition
Changes file owner and group settings:
  • chown user:group filename changes both the owner and group.
  • chown -R user:group directory/ recursively updates permissions for all subdirectories and files.
#4
Term
Standard Redirection Operators (>, >>, 2>)
Definition
  • command > file: Redirects standard output (stdout), overwriting the destination file.
  • command >> file: Appends stdout to the destination file.
  • command 2> file: Redirects standard error (stderr) to the file.
#5
Term
Combining Standard Output and Error (&> / 2>&1)
Definition
Redirects both stdout and stderr to a single file:
  • command > output.log 2>&1 (POSIX compliant)
  • command &> output.log (Bash shorthand)
#6
Term
The Pipe Operator (|)
Definition
Passes the standard output (stdout) of the command on the left directly into the standard input (stdin) of the command on the right.
Example: cat app.log | grep "ERROR"
#7
Term
grep Essential Flags
Definition
Searches plain text for regular expression patterns:
  • -i: Case-insensitive search.
  • -v: Invert match (returns non-matching lines).
  • -r / -R: Recursive directory search.
  • -n: Displays line numbers alongside matches.
#8
Term
Stream Editor (sed) Text Substitution
Definition
Replaces text pattern matches line-by-line:
bash1 line
sed 's/old/new/g' file.txt
  • s: Substitute command.
  • g: Global flag (replaces all matches per line, not just the first).
  • -i: Edits the file in-place instead of printing to stdout.
Showing 8 of 20 cards in this deck.
Study All Now