GNU coreutils Flags & Options
ls, cp, mv, chmod and the other basic file utilities.All GNU coreutils pages
- cp -a: copy a directory and preserve timestamps, permissions and linkscp -a copies files and directories recursively while keeping timestamps, mode, links and ownership. How it differs from cp -r and why cp -a src dest nests.
- cut -d -f: extract fields from lines by a delimitercut -d sets the one-character delimiter and -f picks fields, ranges or open ranges. Why TAB is the default, what -s and --complement do, and when to use awk.
- mkdir -p: create parent directories and ignore existing onesmkdir -p creates every missing parent directory and exits 0 when the directory already exists. Examples with -v and braces, plus why a file in the path fails.
- tail -n +2: print a file starting at line N (skip a header)tail -n +2 prints a file from line 2 to the end, the usual way to drop a CSV header. How +N differs from -n N, head -n -N, and how to keep the header on top.