"Chain the commands with a pipe: cat access.log | grep ERROR | wc -l." What does the pipe operator | do here?
The pipe operator | connects the stdout of one process to the stdin of the next — in memory, without writing to disk. In cat access.log | grep ERROR | wc -l: cat reads the file → grep ERROR filters lines containing "ERROR" → wc -l counts them. Pipes are a core Unix philosophy: small tools that do one thing well, composable with pipes. Compare with redirect (>), which writes output to a file instead of another command.
2 / 5
"The nginx daemon is running in the background and listening on port 443." What is a daemon?
A daemon (pronounced "dee-mon") is a long-running background process detached from any terminal. Naming convention: daemons typically end in 'd' — sshd (SSH server), nginx, systemd, crond. They are managed with systemctl start/stop/status nginx on systemd systems. Unlike interactive processes, daemons log to syslog or their own log files and restart automatically on crash. A cron job differs — it's a scheduled process that runs for a short time and exits.
3 / 5
"The script exited with a non-zero code — check _____ to see the error messages." Which stream carries error output in Unix?
Unix processes have three standard streams: stdin (file descriptor 0) — input, usually the keyboard or a pipe; stdout (fd 1) — normal output, usually the terminal; stderr (fd 2) — error and diagnostic messages. Separating stdout and stderr lets you pipe only good output while still seeing errors: command 2>errors.log redirects stderr to a file. To redirect both: command >out.txt 2>&1. This is why CI logs often show application output separately from error traces.
4 / 5
"Use chmod 755 to make the script executable." What do the three digits in 755 represent?
Unix file permissions use three octal digits representing owner / group / others. Each digit is the sum of: r=4 (read), w=2 (write), x=1 (execute). So 755 means: owner gets 7 (4+2+1 = rwx), group gets 5 (4+0+1 = r-x), others get 5 (r-x). This is typical for executables — the owner can read/write/execute; everyone else can only read and run it. 644 (rw-r--r--) is typical for regular files. View permissions with ls -la; change them with chmod; change owner with chown.
5 / 5
"I'll SSH into the box and check the logs." What does SSH stand for, and what does it provide?
SSH (Secure Shell) lets you log into a remote server and run commands as if you were sitting at its terminal — but the connection is fully encrypted. The standard port is 22. You authenticate with a password or, more securely, an SSH key pair (private key stays on your machine; public key goes on the server in ~/.ssh/authorized_keys). Common uses: ssh user@server for interactive sessions; scp file user@server:/path for file transfers; ssh -L 5432:localhost:5432 user@server for port forwarding (tunnelling a database connection). SSH replaced the insecure telnet and rsh.