ls, grep, find, cp…- or --. Short: -l. Long: --long. Short can combine: -la- (usually).| Flag | What it does |
|---|---|
| Flag | What it does |
|---|---|
| Flag | What it does |
|---|---|
| Criterion | What it filters / means |
|---|---|
| -name "*.conf" | |
| -type f | |
| -size +1k |
/usr/share. What is its name and size?/etc/passwd have?/var/log and list only files modified in the last 7 days. How many are there?/etc whose name contains the word "host". List all matches./var/log/syslog./usr/share/doc using tab completion only — never type the full path at once./etc/hostname in less. Search for the hostname text inside less. Quit. Write the search shortcut you used.tar -xzf downloads.tar.gz — this extracts the archive. You have not learned tar yet. Just use it. We come back to it in Phase 5.|. Write each stage and what it produces before writing the full pipeline.
sort — alphabeticalsort -n — numericsort -r — reversesort -u — sort + deduplicatesort -k2 — sort by field 2
wc -l — count lineswc -w — count wordswc -c — count characters
uniq — remove consecutive duplicatesuniq -c — count occurrencescut -d: -f1 — field 1 (: delimiter)cut -d, -f2 — field 2 (, delimiter)cut -c1-10 — characters 1-10
/etc/passwd./etc/passwd is used most often.