The Linux Commands Cheat Sheet provides 13 GNU Coreutils templates for bulk file review, but it never opens a terminal or executes commands.

For bulk work, the sheet is a searchable reference rather than a batch runner. It helps you choose one conservative command at a time for location, file and directory operations, text previews, line counts, sorting, adjacent duplicate checks, and disk usage. Copying text is the only side effect; the page does not read a filesystem, expand placeholders, or upload repository data.

The reference is deliberately narrower than a general command encyclopedia. Its 13 rows use unique identifiers and checked command strings, and eight templates are fixed against the GNU Coreutils manual with POSIX utility documentation as an independent cross-check. This makes it useful for repeated lookups, but it is not authorization to operate an unfamiliar server.

linux commands cheat sheet bulk
Linux Commands Cheat Sheet: Bulk File Review

The 13 commands in the reference

The available commands cover several parts of a file-review workflow. Their scopes differ, so the table identifies both the intended use and the main limitation to remember before running them.

Command Bulk-review role Important limitation
pwd Confirm the current working directory. Relative paths depend on the location reported by this command.
ls Inspect directory contents before writing or moving data. Confirm the exact names rather than assuming every visible item is the intended target.
mkdir -p Create a directory and any missing parent directories. It normally does not complain when the directory exists, but it cannot guarantee ownership, permissions, mount availability, or path stability.
cp -i Copy a source to a destination with an overwrite prompt. The prompt is a guardrail, not a transaction or backup.
mv -i Move a source to a destination with an overwrite prompt. Resolving the destination is still the operator’s responsibility; the prompt does not provide recovery.
cat Write a file’s complete contents to standard output. Large or binary input can flood the terminal.
head Preview the beginning of a text file. The sheet’s template shows twenty lines, but delimiters and encodings still affect the result.
tail Preview the end of a text file. The sheet’s template shows twenty lines, with the same delimiter and encoding considerations.
wc -l Count newline characters in a file. The result is not necessarily a human-defined count of records.
sort Create ordered output using the separate sorted-file placeholder. Ordering follows the active locale unless it is configured otherwise.
uniq Count or display adjacent duplicates. It does not count all globally unique lines unless the input is already sorted.
df -h Summarize space for mounted file systems in human-readable units. A file-system total does not identify the exact directory consuming space.
du -sh Estimate the blocks attributed to a selected path. The estimate can differ from df because the tools account for different file-system conditions.

Review a batch of files safely

  1. Define the candidate set. Record the exact files or directories involved before opening a command template. Avoid assuming that a wildcard, environment variable, symbolic link, or abbreviated path identifies the intended collection.
  2. Search for one purpose at a time. Enter a command, category, syntax term, or task in the cheat sheet. Searches such as “disk,” “first lines,” “counting,” or “sorting” help narrow the available rows without attempting to execute a batch.
  3. Read the complete description. Replace every angle-bracket placeholder, including <file>, <path>, <source>, <destination>, <directory>, and <sorted-file>. Remove the brackets and quote paths when whitespace or shell metacharacters require it. Use -- before filenames beginning with a hyphen when the utility supports it.
  4. Confirm the execution context. Check the working directory, target paths, executable source, and local documentation. Before a write or move, verify the location with pwd and inspect the relevant directory with ls. Check the local man page and command help before assuming another implementation behaves identically.
  5. Copy and run one reviewed template. Use only the permissions required for that operation. Back up material data before a mutation, and keep secrets out of commands, shell history, filenames, and screenshots. For GNU cp and mv, the displayed -i option prompts before overwriting an existing destination.
  6. Verify the observed result and exit status. Confirm that the output matches the intended file, location, count, or disk scope. Interpret wc -l as a newline count, and confirm whether df or du supplied the measurement you intended to evaluate.
  7. Repeat only after verification. Move to the next target with the same checks. This staged approach is what bulk use means here: repeated, observable commands rather than an unattended script or a shell pipeline.

Handle large text collections in stages

The sheet intentionally omits shell pipelines, so a large batch cannot be treated as one automatic chain. Separate inspection, transformation, and verification steps keep each result visible.

  • Sample before displaying. Use the head and tail templates to inspect the beginning and end of a file. Reserve cat for a file whose size and content type are known, because its standard-output behavior can overwhelm the terminal.
  • Count the defined units. A wc -l result counts newline characters. It may differ from the number of visible entries when the file uses another record separator, lacks a final newline, or contains content that one line includes.
  • Sort into a separate result. Replace the file and sorted-file placeholders in the displayed sort template. Preserve the original, check a sample of the transformed output, and avoid replacing important data until the result has been reviewed.
  • Apply uniq to ordered input. The uniq template is deliberately associated with the sorted-file result because it only recognizes adjacent duplicates. Sorting under the active locale also matters when determining whether records are considered equal.

These constraints matter more as the collection grows. A syntactically valid command can still read the wrong path, a wildcard can expand to more files than expected, and a symbolic link can resolve somewhere other than its displayed name.

Separate file-system space from path usage

Disk investigation requires two distinct reports because df and du measure different scopes. Neither number identifies a safe deletion by itself.

Report What it covers Question it helps answer
df -h Mounted file systems, summarized with human-readable units. Which mounted file system is running low on available space?
du -sh <path> Blocks attributed to a selected path, reported as an estimate. How much space is attributed to this particular directory or file?

The totals can differ because of deleted-but-open files, sparse files, hard links, permissions, mount boundaries, snapshots, reserved blocks, and file-system accounting. As a result, a large du result does not necessarily explain the free-space figure shown by df, and a large df total does not identify the exact consumer.

If disk pressure is urgent, identify the exact consumer and preserve recoverability before deleting anything. The cheat sheet contains no recursive deletion command or force flag, so it cannot make that cleanup decision for you.

Limits for bulk use and unfamiliar systems

  • The coverage is focused. The 13 commands cover location, files, text preview, counting, sorting, adjacent duplicates, and disk usage. The sheet omits shell pipelines, recursive deletion, force flags, privilege escalation, process termination, permission rewriting, package management, and network changes.
  • The page does not automate execution. It can copy exactly one displayed template at a time. It cannot run that template, inspect the result, or manage a batch of targets.
  • Behavior can vary by environment. Interactive behavior may differ in aliases, scripts, noninteractive sessions, and non-GNU systems. Options and output can also differ on BSD or macOS, BusyBox, containers, minimal images, and older distributions.
  • Bulk scripts need stricter controls. Handle exit status, quote variables, set an explicit working directory, and choose idempotent operations. Confirm the executable source, consult its local documentation, and select an operation that is safe to repeat.

The sheet supports recall, conservative copying, and repeatable review steps. It does not supply backups, transactions, automatic target resolution, or permission to make destructive decisions. For important data, back up first, verify the exact target, run one command at a time, and confirm both the observed output and exit status before continuing.

If you're weighing options, How to Get the MAC Address of a PC: Windows, macOS, Linux covers this in detail.

If you're weighing options, MIME Type Lookup Cheat Sheet: 24 Common Media Types covers this in detail.