BashFlagSpecs.json
|
{
"alias": [ { "flag": "-p", "desc": "list all aliases" }, { "flag": "-u", "desc": "unalias mode" }, { "flag": "-a", "desc": "remove all (with -u)" } ], "awk": [ { "flag": "-F", "desc": "field separator" }, { "flag": "-v", "desc": "variable" }, { "flag": "-f", "desc": "program file" }, { "flag": "--file", "desc": "program file" } ], "base64": [ { "flag": "-d", "desc": "decode" }, { "flag": "-w", "desc": "wrap at column" } ], "basename": [ { "flag": "-a", "desc": "all operands are names" }, { "flag": "-s", "desc": "suffix" } ], "cat": [ { "flag": "-n", "desc": "number all lines" }, { "flag": "-b", "desc": "number non-blank lines" }, { "flag": "-s", "desc": "squeeze blank lines" }, { "flag": "-E", "desc": "show $ at line end" }, { "flag": "-T", "desc": "show ^I for tabs" }, { "flag": "-A", "desc": "show all: -vET" }, { "flag": "-e", "desc": "-vE" }, { "flag": "-t", "desc": "-vT" }, { "flag": "-v", "desc": "show non-printing as ^X / M-X" } ], "column": [ { "flag": "-t", "desc": "table mode" }, { "flag": "-s", "desc": "separator" }, { "flag": "-c", "desc": "output width (fill layout)" }, { "flag": "-x", "desc": "fill rows before columns" } ], "comm": [ { "flag": "-1", "desc": "suppress col 1" }, { "flag": "-2", "desc": "suppress col 2" }, { "flag": "-3", "desc": "suppress col 3" }, { "flag": "--total", "desc": "append a summary line of the column counts" }, { "flag": "--output-delimiter", "desc": "separate columns with STR", "arg": "STR" }, { "flag": "-z", "desc": "line delimiter is NUL, not newline" }, { "flag": "--check-order", "desc": "check that the input is correctly sorted" }, { "flag": "--nocheck-order", "desc": "do not check that the input is correctly sorted" } ], "command": [ { "flag": "-v", "desc": "print command name or path" } ], "cp": [ { "flag": "-r", "desc": "recursive" }, { "flag": "-v", "desc": "verbose" }, { "flag": "-n", "desc": "no-clobber" }, { "flag": "-f", "desc": "force" }, { "flag": "-p", "desc": "preserve mode, ownership, timestamps" }, { "flag": "-a", "desc": "archive (recursive, preserve all)" }, { "flag": "--preserve", "desc": "preserve the listed attributes (default mode,ownership,timestamps)", "arg": "[LIST]" }, { "flag": "--no-preserve", "desc": "do not preserve the listed attributes", "arg": "LIST" }, { "flag": "-i", "desc": "prompt before overwriting" }, { "flag": "-l", "desc": "hard link files instead of copying" }, { "flag": "-s", "desc": "make symbolic links instead of copying" }, { "flag": "-b", "desc": "make a backup of each existing destination file" }, { "flag": "--backup", "desc": "backup with CONTROL (none, numbered, existing, simple)", "arg": "[CONTROL]" }, { "flag": "-S", "desc": "override the usual backup suffix", "arg": "SUFFIX" }, { "flag": "-t", "desc": "copy all SOURCE arguments into DIRECTORY", "arg": "DIRECTORY" }, { "flag": "-T", "desc": "treat DEST as a normal file" }, { "flag": "-u", "desc": "copy only when SOURCE is newer than DEST" }, { "flag": "--update", "desc": "control which existing files are replaced (all, none, older)", "arg": "[WHEN]" }, { "flag": "--reflink", "desc": "clone files when the filesystem can (auto, always, never)", "arg": "[WHEN]" }, { "flag": "-L", "desc": "always follow symbolic links in SOURCE" }, { "flag": "-P", "desc": "never follow symbolic links in SOURCE" }, { "flag": "-H", "desc": "follow command-line symbolic links in SOURCE" }, { "flag": "-d", "desc": "same as --no-dereference --preserve=links" }, { "flag": "-x", "desc": "stay on this file system" }, { "flag": "--sparse", "desc": "control creation of sparse files (never, auto, always)", "arg": "WHEN" }, { "flag": "--strip-trailing-slashes", "desc": "remove trailing slashes from each SOURCE argument" }, { "flag": "--attributes-only", "desc": "do not copy file data, just the attributes" }, { "flag": "--remove-destination", "desc": "remove each existing destination file before opening it" }, { "flag": "--parents", "desc": "use full source file name under DIRECTORY" }, { "flag": "--debug", "desc": "explain how a file is copied (implies -v)" } ], "cut": [ { "flag": "-d", "desc": "delimiter" }, { "flag": "-f", "desc": "fields" }, { "flag": "-c", "desc": "characters" } ], "date": [ { "flag": "-d", "desc": "date string" }, { "flag": "-u", "desc": "UTC" }, { "flag": "-r", "desc": "reference file" }, { "flag": "+FORMAT", "desc": "output format" } ], "diff": [ { "flag": "-u", "desc": "unified format" }, { "flag": "-c", "desc": "context format" }, { "flag": "-q", "desc": "report only whether files differ" }, { "flag": "-w", "desc": "ignore all whitespace" }, { "flag": "-b", "desc": "ignore changes in whitespace amount" }, { "flag": "-B", "desc": "ignore blank line changes" }, { "flag": "-i", "desc": "case-insensitive comparison" }, { "flag": "-s", "desc": "report when two files are the same" }, { "flag": "-r", "desc": "recurse into subdirectories" }, { "flag": "-N", "desc": "treat absent files as empty" }, { "flag": "-a", "desc": "treat all files as text" }, { "flag": "-U", "desc": "output NUM lines of unified context", "arg": "NUM" }, { "flag": "-C", "desc": "output NUM lines of copied context", "arg": "NUM" }, { "flag": "--label", "desc": "use LABEL instead of the file name and timestamp", "arg": "LABEL" }, { "flag": "--strip-trailing-cr", "desc": "strip trailing carriage return on input" } ], "dirs": [ { "flag": "-c", "desc": "clear directory stack" }, { "flag": "-p", "desc": "print one per line" }, { "flag": "-v", "desc": "print with line numbers" } ], "du": [ { "flag": "-h", "desc": "human readable" }, { "flag": "-s", "desc": "summarize" }, { "flag": "-a", "desc": "all files" }, { "flag": "-c", "desc": "show total" }, { "flag": "-d", "desc": "max depth" } ], "echo": [ { "flag": "-n", "desc": "no trailing newline" }, { "flag": "-e", "desc": "enable escape sequences" }, { "flag": "-E", "desc": "disable escape sequences" } ], "eval": [ { "flag": "COMMAND", "desc": "command string to evaluate" } ], "expand": [ { "flag": "-t", "desc": "tab width" } ], "file": [ { "flag": "-b", "desc": "brief" }, { "flag": "-i", "desc": "MIME type" }, { "flag": "-L", "desc": "follow symlinks" } ], "find": [ { "flag": "-name", "desc": "match base name against a shell glob", "arg": "PATTERN", "detail": "Keep entries whose base name (the last path component, no directories) matches the shell glob PATTERN. Matching is case-sensitive. Glob metacharacters: * (any run of chars), ? (one char), [abc] / [a-z] (a character class). Quote the pattern in single quotes so the shell does not expand it before find sees it.", "examples": [ "find . -name '*.txt'", "find . -name 'Make*'", "find src -name '*.[ch]'" ] }, { "flag": "-type", "desc": "filter by file type", "arg": "f|d|l", "detail": "Keep only entries of the given type: f = regular file, d = directory, l = symbolic link. Combine with -name to scope a search, e.g. only directories named build.", "examples": [ "find . -type f", "find . -type d -name node_modules" ] }, { "flag": "-size", "desc": "filter by file size", "arg": "[+-]N[ckMG]", "detail": "Match files by size. A leading + means greater than, - means less than, no sign means exactly. Unit suffix: c = bytes, k = kibibytes, M = mebibytes, G = gibibytes (default is 512-byte blocks).", "examples": [ "find . -size +10M", "find . -type f -size -1k" ] }, { "flag": "-maxdepth", "desc": "limit recursion depth", "arg": "N", "detail": "Descend at most N directory levels below the starting point. -maxdepth 1 searches only the immediate children of the start directory (no recursion into subdirectories).", "examples": [ "find . -maxdepth 1 -type f", "find . -maxdepth 2 -name '*.log'" ] }, { "flag": "-mtime", "desc": "filter by modification time (days)", "arg": "[+-]N", "detail": "Match files modified N*24 hours ago. +N means more than N days ago, -N means within the last N days, N means exactly N days ago.", "examples": [ "find . -mtime -7", "find /tmp -type f -mtime +30" ] }, { "flag": "-empty", "desc": "match empty files and directories", "detail": "Keep regular files that are zero bytes and directories that contain no entries.", "examples": [ "find . -type f -empty", "find . -type d -empty" ] }, { "flag": "-print0", "desc": "null-delimited output", "detail": "Separate results with a NUL byte instead of a newline, so filenames containing spaces or newlines survive a pipe. Pair with 'xargs -0'.", "examples": [ "find . -name '*.tmp' -print0 | xargs -0 rm" ] }, { "flag": "-exec", "desc": "run a command on each match", "arg": "CMD {} ;", "detail": "Run CMD for each matched entry. {} is replaced with the path of the entry. Terminate the command with a literal ; (run once per file) or + (batch many paths into one invocation). Quote or escape ; so the shell does not consume it.", "examples": [ "find . -name '*.sh' -exec chmod +x {} ;", "find . -type f -exec grep -l TODO {} +" ] }, { "flag": "-iname", "desc": "case-insensitive -name", "arg": "PATTERN", "detail": "Like -name, but the shell-glob match against the base name ignores case. Useful when extensions or names vary in case (README vs readme, .JPG vs .jpg).", "examples": [ "find . -iname 'readme*'", "find . -iname '*.jpg'" ] }, { "flag": "-path", "desc": "match the whole path against a glob", "arg": "PATTERN", "detail": "Match the glob PATTERN against the entire path find prints (e.g. ./src/app/main.js), not just the base name. A * here also spans / , so '*/node_modules/*' matches anything under any node_modules directory. Use -ipath for the case-insensitive form.", "examples": [ "find . -path '*/test/*'", "find . -path '*/node_modules/*'" ] }, { "flag": "-regex", "desc": "match the whole path against a regex", "arg": "REGEX", "detail": "Keep entries whose entire printed path matches REGEX (the match is implicitly anchored to the whole path). Use -iregex for the case-insensitive form.", "examples": [ "find . -regex '.*\\.(c|h)'", "find . -regex '.*/test/.*\\.js'" ] }, { "flag": "-mindepth", "desc": "skip entries above a depth", "arg": "N", "detail": "Ignore entries at fewer than N directory levels below the starting point. -mindepth 1 excludes the starting directory itself; pair with -maxdepth to search an exact depth band.", "examples": [ "find . -mindepth 1 -maxdepth 1 -type d", "find . -mindepth 2 -name '*.cfg'" ] }, { "flag": "-newer", "desc": "modified more recently than a file", "arg": "FILE", "detail": "Keep entries whose modification time is strictly newer than FILE's. A common idiom for 'what changed since X' using a reference file or marker.", "examples": [ "find . -type f -newer .last-build", "find src -newer README.md" ] }, { "flag": "-delete", "desc": "delete matched entries (destructive)", "detail": "Remove every matched entry. This is an action, not a filter: it prints nothing and should usually come last. It deletes deepest paths first (it implies -depth) so a directory can be removed after its matched contents. Only matched entries are deleted — a directory that still contains unmatched files cannot be removed and reports an error. There is no undo; preview with the same predicates (without -delete) first.", "examples": [ "find . -name '*.tmp' -delete", "find build -type f -empty -delete" ] }, { "flag": "-prune", "desc": "do not descend into matched directories", "detail": "When a matched entry is a directory, do not recurse into it (its contents are skipped). The directory itself is still listed. The classic exclude idiom works: find . -path X -prune -o -print.", "examples": [ "find . -name .git -prune" ] }, { "flag": "-depth", "desc": "process directory contents first", "detail": "Emit (or act on) the entries inside a directory before the directory itself. Implied by -delete so that directories are emptied before removal.", "examples": [ "find . -depth -type d" ] }, { "flag": "-perm", "desc": "match permission bits", "arg": "MODE", "detail": "MODE exact, -MODE all of the bits, /MODE any of the bits; octal or symbolic (u=rw,g=r). On Windows the mode is synthesised (0644 files, 0755 dirs/executables).", "examples": [ "find . -perm 644", "find . -perm -u=x" ] }, { "flag": "-user", "desc": "owned by a user", "arg": "NAME|UID", "detail": "Match files owned by NAME (or numeric uid). Windows maps the owner SID to the account name.", "examples": [ "find . -user root" ] }, { "flag": "-group", "desc": "owned by a group", "arg": "NAME|GID", "detail": "Match files whose group is NAME (or numeric gid).", "examples": [ "find . -group staff" ] }, { "flag": "-uid", "desc": "owner uid comparison", "arg": "[+-]N", "detail": "Numeric owner id; +N greater, -N less.", "examples": [ "find . -uid +1000" ] }, { "flag": "-gid", "desc": "group gid comparison", "arg": "[+-]N", "detail": "Numeric group id; +N greater, -N less.", "examples": [ "find . -gid 0" ] }, { "flag": "-nouser", "desc": "owner has no account", "detail": "Match files whose owner id has no user entry.", "examples": [ "find . -nouser" ] }, { "flag": "-nogroup", "desc": "group has no entry", "detail": "Match files whose group id has no group entry.", "examples": [ "find . -nogroup" ] }, { "flag": "-printf", "desc": "print with a format", "arg": "FORMAT", "detail": "GNU -printf: %p %f %h %P %H %s %m %M %u %g %U %G %y %Y %l %d %n %i %k %b %S %t %T@ %Tk and friends; flags, width and precision (%-10p, %.3f). No newline is added; \\n \\t \\\\ \\NNN \\c are escapes.", "examples": [ "find . -type f -printf '%s %p\\n'" ] }, { "flag": "-fprint", "desc": "print paths into a file", "arg": "FILE", "detail": "Like -print but writes to FILE (truncated when find starts; /dev/stdout and /dev/stderr work).", "examples": [ "find . -name '*.c' -fprint list.txt" ] }, { "flag": "-fprint0", "desc": "NUL-terminated paths into a file", "arg": "FILE", "detail": "Like -print0 but writes to FILE.", "examples": [ "find . -fprint0 list.bin" ] }, { "flag": "-fprintf", "desc": "-printf into a file", "arg": "FILE FORMAT", "detail": "Like -printf but writes to FILE.", "examples": [ "find . -fprintf out.txt '%p\\n'" ] }, { "flag": "-ls", "desc": "ls -dils style listing", "detail": "Print inode, blocks, mode, links, owner, group, size, date and name for each match.", "examples": [ "find . -maxdepth 1 -ls" ] }, { "flag": "-fls", "desc": "-ls into a file", "arg": "FILE", "detail": "Like -ls but writes to FILE.", "examples": [ "find . -fls listing.txt" ] }, { "flag": "-newerXY", "desc": "newer by chosen timestamps", "arg": "FILE", "detail": "Compare timestamp X of the entry (a access, B birth, c change, m modify) with timestamp Y of FILE; Y = t treats FILE as a date string.", "examples": [ "find . -newermt 2024-01-01" ] }, { "flag": "-amin", "desc": "accessed N minutes ago", "arg": "[+-]N", "detail": "Access-time minutes; +N older, -N newer.", "examples": [ "find . -amin -10" ] }, { "flag": "-cmin", "desc": "status changed N minutes ago", "arg": "[+-]N", "detail": "Change-time minutes; +N older, -N newer.", "examples": [ "find . -cmin -10" ] }, { "flag": "-mmin", "desc": "modified N minutes ago", "arg": "[+-]N", "detail": "Modification-time minutes; +N older, -N newer.", "examples": [ "find . -mmin -5" ] }, { "flag": "-atime", "desc": "accessed N days ago", "arg": "[+-]N", "detail": "Access-time days.", "examples": [ "find . -atime +30" ] }, { "flag": "-ctime", "desc": "status changed N days ago", "arg": "[+-]N", "detail": "Change-time days.", "examples": [ "find . -ctime -1" ] }, { "flag": "-daystart", "desc": "measure days from midnight", "detail": "Measure -mtime/-atime/-ctime/-mmin from the start of today.", "examples": [ "find . -daystart -mtime 0" ] }, { "flag": "-links", "desc": "link count", "arg": "[+-]N", "detail": "Match by hard-link count.", "examples": [ "find . -links +1" ] }, { "flag": "-inum", "desc": "inode number", "arg": "[+-]N", "detail": "Match by inode number.", "examples": [ "find . -inum 1234" ] }, { "flag": "-samefile", "desc": "same file as NAME", "arg": "NAME", "detail": "Match entries that are the same file (same inode) as NAME.", "examples": [ "find . -samefile a.txt" ] }, { "flag": "-executable", "desc": "executable by this user", "detail": "Match files the current user can execute (search permission for directories).", "examples": [ "find . -type f -executable" ] }, { "flag": "-readable", "desc": "readable by this user", "detail": "Match files the current user can read.", "examples": [ "find . -readable" ] }, { "flag": "-writable", "desc": "writable by this user", "detail": "Match files the current user can write.", "examples": [ "find . -writable" ] }, { "flag": "-lname", "desc": "symlink target glob", "arg": "PATTERN", "detail": "Match symbolic links whose target matches PATTERN (-ilname ignores case).", "examples": [ "find . -lname '*.so'" ] }, { "flag": "-wholename", "desc": "match whole path", "arg": "PATTERN", "detail": "Same as -path (-iwholename ignores case).", "examples": [ "find . -wholename './src/*'" ] }, { "flag": "-regextype", "desc": "regex dialect for -regex", "arg": "TYPE", "detail": "emacs (default), posix-basic, posix-extended, egrep, awk, sed, grep ... translated to .NET regular expressions.", "examples": [ "find . -regextype posix-extended -regex '.*\\.(c|h)'" ] }, { "flag": "-quit", "desc": "stop at the first reach", "detail": "Exit immediately when evaluated.", "examples": [ "find . -name x -print -quit" ] }, { "flag": "-ok", "desc": "-exec with confirmation", "arg": "CMD {} ;", "detail": "Ask on stderr before running each command; answers are read from standard input (y/Y runs it).", "examples": [ "find . -name '*.bak' -ok rm {} ;" ] }, { "flag": "-okdir", "desc": "-execdir with confirmation", "arg": "CMD {} ;", "detail": "Like -ok but runs in the entry's directory.", "examples": [ "find . -ok echo {} ;" ] }, { "flag": "-execdir", "desc": "run a command in the entry's directory", "arg": "CMD {} ;", "detail": "Like -exec but the command runs in the directory containing the match, with {} = ./name; + batches per directory.", "examples": [ "find . -name '*.sh' -execdir chmod +x {} +" ] }, { "flag": "-xdev", "desc": "stay on one file system", "detail": "Accepted; this walk never crosses mount points differently (no-op).", "examples": [ "find . -xdev" ] }, { "flag": "-follow", "desc": "follow symbolic links", "detail": "Same as -L.", "examples": [ "find . -follow" ] } ], "fold": [ { "flag": "-w", "desc": "wrap width" }, { "flag": "-s", "desc": "break at spaces" }, { "flag": "-b", "desc": "count bytes" } ], "grep": [ { "flag": "-i", "desc": "ignore case", "detail": "Match without case sensitivity. This applies to basic regex, extended regex (-E), fixed string (-F), and explicit -e patterns.", "examples": [ "grep -i 'error' app.log", "grep -i -e 'todo' -e 'fixme' src/*.cs" ] }, { "flag": "-v", "desc": "invert match", "detail": "Select lines that do not match the pattern. Use this to filter out comments, generated files, or known-noisy log lines.", "examples": [ "grep -v '^#' .env", "grep -v -e 'DEBUG' -e 'TRACE' app.log" ] }, { "flag": "-n", "desc": "line numbers" }, { "flag": "-c", "desc": "count only" }, { "flag": "-r", "desc": "recursive" }, { "flag": "-l", "desc": "files with matches" }, { "flag": "-E", "desc": "extended regex", "detail": "Use extended regular expressions so operators like |, +, ?, and grouped alternation work without extra backslashes. Quote patterns so the shell passes regex metacharacters to grep unchanged.", "examples": [ "grep -E 'error|warning' app.log", "grep -E '^[A-Z_]+=' .env" ] }, { "flag": "-A", "desc": "after context" }, { "flag": "-B", "desc": "before context" }, { "flag": "-C", "desc": "context" }, { "flag": "-F", "desc": "fixed strings", "detail": "Treat the pattern as literal text instead of a regular expression. Useful for strings that contain regex metacharacters such as ., [, ], *, ?, or |.", "examples": [ "grep -F 'a.b[0]' notes.txt", "grep -F 'error|warning' app.log" ] }, { "flag": "-w", "desc": "word regexp", "detail": "Require the match to be a whole word. This is handy when searching identifiers or command names and avoiding substrings inside longer words.", "examples": [ "grep -w 'cat' README.md", "grep -w -E 'init|start|stop' scripts/*.sh" ] }, { "flag": "-o", "desc": "only matching" }, { "flag": "-H", "desc": "with filename" }, { "flag": "-h", "desc": "no filename" }, { "flag": "-e", "desc": "pattern", "arg": "PATTERN", "detail": "Add PATTERN as a search expression. Repeat -e to OR several patterns, or use it when a pattern begins with - so grep does not treat it as an option. Basic regex is the default: . matches any character, [abc] matches one listed character, [0-9] matches a range, * repeats the previous atom, ^ anchors the start of the line, and $ anchors the end. Use -E for easier alternation and grouping, or -F when the text should be literal.", "examples": [ "grep -e '^TODO' -e 'FIXME' src/*.cs", "grep -e '^-n' options.txt", "grep -E -e 'error|warning' app.log" ] }, { "flag": "-m", "desc": "max count" }, { "flag": "-P", "desc": "perl-compatible regex", "detail": "PCRE patterns mapped onto the .NET engine: lookaround, \\K, \\Q..\\E, possessive quantifiers, named groups. Recursion, subroutine calls, branch reset and backtracking verbs are refused (exit 2). One pattern only." }, { "flag": "-z", "desc": "NUL-separated input and output records" }, { "flag": "-Z", "desc": "NUL after each file name" }, { "flag": "-a", "desc": "treat binary files as text" }, { "flag": "-I", "desc": "skip binary files (binary-files=without-match)" }, { "flag": "--binary-files", "desc": "binary file handling", "arg": "binary|text|without-match" }, { "flag": "-b", "desc": "byte offset of each line" }, { "flag": "-T", "desc": "align content with a tab after the prefix" }, { "flag": "-d", "desc": "directories action", "arg": "read|skip|recurse" }, { "flag": "-D", "desc": "devices action", "arg": "read|skip" }, { "flag": "--label", "desc": "name to show for standard input", "arg": "LABEL" }, { "flag": "--group-separator", "desc": "line between context groups", "arg": "SEP" }, { "flag": "--no-group-separator", "desc": "no line between context groups" }, { "flag": "--color", "desc": "colour matches", "arg": "never|always|auto" } ], "gzip": [ { "flag": "-d", "desc": "decompress" }, { "flag": "-c", "desc": "write to stdout" }, { "flag": "-k", "desc": "keep original" }, { "flag": "-f", "desc": "force" }, { "flag": "-v", "desc": "verbose" }, { "flag": "-l", "desc": "list" }, { "flag": "-1", "desc": "fastest compression" }, { "flag": "-9", "desc": "best compression" } ], "head": [ { "flag": "-n", "desc": "number of lines" }, { "flag": "-c", "desc": "number of bytes", "arg": "NUM" }, { "flag": "-q", "desc": "never print file name headers" } ], "install": [ { "flag": "-d", "desc": "create directories" }, { "flag": "-D", "desc": "create leading path components" }, { "flag": "-m", "desc": "set mode" }, { "flag": "-v", "desc": "verbose" }, { "flag": "-s", "desc": "strip" }, { "flag": "-t", "desc": "target directory" }, { "flag": "-S", "desc": "swap suffix" } ], "join": [ { "flag": "-t", "desc": "delimiter" }, { "flag": "-1", "desc": "field from file 1" }, { "flag": "-2", "desc": "field from file 2" }, { "flag": "-j", "desc": "join field of both files", "arg": "FIELD" }, { "flag": "-a", "desc": "also print unpairable lines from file 1 or 2", "arg": "FILENUM" }, { "flag": "-v", "desc": "print only unpairable lines from file 1 or 2", "arg": "FILENUM" }, { "flag": "-i", "desc": "ignore case in comparing fields" }, { "flag": "-o", "desc": "obey FORMAT while constructing output line (or auto)", "arg": "FORMAT" }, { "flag": "-e", "desc": "replace missing input fields with EMPTY", "arg": "EMPTY" }, { "flag": "-z", "desc": "line delimiter is NUL, not newline" }, { "flag": "--check-order", "desc": "check that the input is correctly sorted" }, { "flag": "--nocheck-order", "desc": "do not check that the input is correctly sorted" }, { "flag": "--header", "desc": "treat the first line in each file as field headers" } ], "jq": [ { "flag": "-r", "desc": "raw output" }, { "flag": "-c", "desc": "compact output" }, { "flag": "-S", "desc": "sort keys" }, { "flag": "-s", "desc": "slurp" }, { "flag": "-R", "desc": "raw input (each line is a string)" }, { "flag": "-j", "desc": "join output (raw, no newline after each result)" }, { "flag": "-n", "desc": "use null as the single input value" }, { "flag": "-e", "desc": "set the exit status from the last output (1 for false/null, 4 for none)" }, { "flag": "-a", "desc": "ASCII output (escape non-ASCII characters)" }, { "flag": "-f", "desc": "read the program from FILE", "arg": "FILE" }, { "flag": "--arg", "desc": "set $NAME to the string VALUE", "arg": "NAME VALUE" }, { "flag": "--argjson", "desc": "set $NAME to the JSON text", "arg": "NAME JSON" }, { "flag": "--slurpfile", "desc": "set $NAME to the array of JSON values in FILE", "arg": "NAME FILE" }, { "flag": "--rawfile", "desc": "set $NAME to the contents of FILE as a string", "arg": "NAME FILE" }, { "flag": "--args", "desc": "remaining arguments are positional strings ($ARGS.positional)" }, { "flag": "--jsonargs", "desc": "remaining arguments are positional JSON texts" }, { "flag": "--tab", "desc": "indent with a tab" }, { "flag": "--indent", "desc": "indent with N spaces (0-7)", "arg": "N" }, { "flag": "--stream", "desc": "output the input as path/leaf events" } ], "ln": [ { "flag": "-s", "desc": "symbolic" }, { "flag": "-f", "desc": "force" }, { "flag": "-v", "desc": "verbose" }, { "flag": "-n", "desc": "treat LINK_NAME that is a link to a directory as a normal file" }, { "flag": "-t", "desc": "create the links in DIRECTORY", "arg": "DIRECTORY" }, { "flag": "-T", "desc": "treat LINK_NAME as a normal file always" }, { "flag": "-i", "desc": "prompt whether to remove destinations" }, { "flag": "-r", "desc": "create symbolic links relative to link location" }, { "flag": "-b", "desc": "make a backup of each existing destination file" }, { "flag": "-S", "desc": "override the usual backup suffix", "arg": "SUFFIX" } ], "ls": [ { "flag": "-l", "desc": "long listing" }, { "flag": "-a", "desc": "show hidden" }, { "flag": "-h", "desc": "human readable sizes" }, { "flag": "-R", "desc": "recursive" }, { "flag": "-S", "desc": "sort by size" }, { "flag": "-t", "desc": "sort by time" }, { "flag": "-r", "desc": "reverse sort" }, { "flag": "-1", "desc": "one per line" }, { "flag": "-A", "desc": "show hidden except . and .." }, { "flag": "-d", "desc": "list directories themselves" }, { "flag": "-p", "desc": "append / to directories" }, { "flag": "-F", "desc": "classify: append */=>@| indicators" }, { "flag": "-i", "desc": "print inode numbers (accepted, not shown)" }, { "flag": "-s", "desc": "print block sizes (accepted, not shown)" }, { "flag": "--color", "desc": "colorize output", "arg": "WHEN" }, { "flag": "--sort", "desc": "sort by size or time", "arg": "WORD" }, { "flag": "--classify", "desc": "classify entries", "arg": "WHEN" }, { "flag": "--group-directories-first", "desc": "list directories before files" }, { "flag": "-C", "desc": "list entries in columns, sorted down" }, { "flag": "-x", "desc": "list entries in rows (across)" }, { "flag": "-m", "desc": "comma-separated list, filled to the width" }, { "flag": "-w", "desc": "set the output width (0 = no limit)", "arg": "COLS" }, { "flag": "-T", "desc": "assume tab stops every COLS (0 = spaces only)", "arg": "COLS" }, { "flag": "--format", "desc": "across, commas, horizontal, long, single-column, verbose, vertical", "arg": "WORD" }, { "flag": "--width", "desc": "set the output width (0 = no limit)", "arg": "COLS" }, { "flag": "--tabsize", "desc": "assume tab stops every COLS", "arg": "COLS" }, { "flag": "-I", "desc": "do not list entries matching PATTERN", "arg": "PATTERN" }, { "flag": "--ignore", "desc": "do not list entries matching PATTERN", "arg": "PATTERN" }, { "flag": "--hide", "desc": "do not list entries matching PATTERN (unless -a / -A)", "arg": "PATTERN" }, { "flag": "-B", "desc": "do not list entries ending with ~" }, { "flag": "--ignore-backups", "desc": "do not list entries ending with ~" }, { "flag": "-n", "desc": "long listing with numeric uid and gid" }, { "flag": "-g", "desc": "long listing without the owner" }, { "flag": "-o", "desc": "long listing without the group" }, { "flag": "-G", "desc": "in a long listing, do not print the group" }, { "flag": "-U", "desc": "do not sort (directory order)" }, { "flag": "-X", "desc": "sort by extension" }, { "flag": "-u", "desc": "with -l show and sort by access time, else sort by it" }, { "flag": "-c", "desc": "with -l show and sort by change time, else sort by it" }, { "flag": "--time", "desc": "atime, access, use, ctime, status, mtime, modification, birth, creation", "arg": "WORD" }, { "flag": "--full-time", "desc": "like -l --time-style=full-iso" }, { "flag": "--time-style", "desc": "full-iso, long-iso, iso, locale (or posix- forms)", "arg": "STYLE" }, { "flag": "--numeric-uid-gid", "desc": "like -l, but list numeric user and group IDs" }, { "flag": "--no-group", "desc": "in a long listing, do not print group names" } ], "mapfile": [ { "flag": "-t", "desc": "strip trailing delimiter" }, { "flag": "-n", "desc": "copy at most N lines" }, { "flag": "-O", "desc": "start assigning at index N" } ], "md5sum": [ { "flag": "-c", "desc": "check" }, { "flag": "-b", "desc": "binary mode" } ], "mkdir": [ { "flag": "-p", "desc": "parents" }, { "flag": "-v", "desc": "verbose" }, { "flag": "-m", "desc": "set file mode (octal or symbolic)", "arg": "MODE" }, { "flag": "--mode", "desc": "set file mode (octal or symbolic)", "arg": "MODE" } ], "mv": [ { "flag": "-v", "desc": "verbose" }, { "flag": "-n", "desc": "no-clobber" }, { "flag": "-f", "desc": "force" }, { "flag": "-i", "desc": "prompt before overwrite" }, { "flag": "-b", "desc": "make a backup of each existing destination file" }, { "flag": "-S", "desc": "override the usual backup suffix", "arg": "SUFFIX" }, { "flag": "-t", "desc": "move all SOURCE arguments into DIRECTORY", "arg": "DIRECTORY" }, { "flag": "-T", "desc": "treat DEST as a normal file" }, { "flag": "-u", "desc": "move only when the source is newer than the destination" } ], "nl": [ { "flag": "-ba", "desc": "number all lines" } ], "paste": [ { "flag": "-d", "desc": "delimiter" }, { "flag": "-s", "desc": "serial" } ], "popd": [ { "flag": "+N", "desc": "remove Nth entry from stack" } ], "ps": [ { "flag": "-e", "desc": "all processes" }, { "flag": "-A", "desc": "all processes" }, { "flag": "-f", "desc": "full format" }, { "flag": "-u", "desc": "filter user" }, { "flag": "-p", "desc": "filter pid" }, { "flag": "--sort", "desc": "sort key" }, { "flag": "-o", "desc": "output format" } ], "printf": [ { "flag": "-v", "desc": "assign the output to shell variable VAR instead of printing it", "arg": "VAR" } ], "pushd": [ { "flag": "+N", "desc": "rotate stack so Nth dir becomes top" } ], "pwd": [ { "flag": "-P", "desc": "physical path" } ], "readarray": [ { "flag": "-t", "desc": "strip trailing delimiter" }, { "flag": "-n", "desc": "copy at most N lines" }, { "flag": "-O", "desc": "start assigning at index N" } ], "realpath": [], "rg": [ { "flag": "-i", "desc": "ignore case" }, { "flag": "-w", "desc": "word regexp" }, { "flag": "-c", "desc": "count matches" }, { "flag": "-l", "desc": "files with matches" }, { "flag": "-n", "desc": "line numbers" }, { "flag": "-N", "desc": "no line numbers" }, { "flag": "-o", "desc": "only matching" }, { "flag": "-v", "desc": "invert match" }, { "flag": "-F", "desc": "fixed strings" }, { "flag": "-g", "desc": "glob filter" }, { "flag": "-A", "desc": "after context" }, { "flag": "-B", "desc": "before context" }, { "flag": "-C", "desc": "context" }, { "flag": "--hidden", "desc": "include dotfiles" }, { "flag": "-e", "desc": "pattern (repeatable)" }, { "flag": "-f", "desc": "patterns from file" }, { "flag": "-S", "desc": "smart case" }, { "flag": "-s", "desc": "case sensitive" }, { "flag": "-x", "desc": "line regexp" }, { "flag": "-u", "desc": "unrestricted (-uu: hidden too)" }, { "flag": "-t", "desc": "search only this file type" }, { "flag": "-T", "desc": "exclude this file type" }, { "flag": "--type-list", "desc": "list file types" }, { "flag": "--type-add", "desc": "define a file type (name:glob)" }, { "flag": "--type-clear", "desc": "clear a file type" }, { "flag": "-m", "desc": "max matching lines per file" }, { "flag": "-q", "desc": "quiet: exit status only" }, { "flag": "-H", "desc": "print file names" }, { "flag": "-I", "desc": "no file names" }, { "flag": "-r", "desc": "replace matches ($1, ${name})" }, { "flag": "--passthru", "desc": "print every line" }, { "flag": "--column", "desc": "column numbers" }, { "flag": "--vimgrep", "desc": "vim-style file:line:col:text" }, { "flag": "-b", "desc": "byte offsets" }, { "flag": "-0", "desc": "NUL after file names" }, { "flag": "--files", "desc": "list searchable files" }, { "flag": "--sort", "desc": "sort by path|modified|accessed|created" }, { "flag": "--sortr", "desc": "reverse sort" }, { "flag": "-d", "desc": "max directory depth" }, { "flag": "-L", "desc": "follow symlinks" }, { "flag": "--json", "desc": "JSON lines output" }, { "flag": "--stats", "desc": "print statistics" }, { "flag": "-z", "desc": "search gzip files" }, { "flag": "-a", "desc": "search binary files as text" }, { "flag": "-E", "desc": "text encoding" }, { "flag": "-P", "desc": "PCRE2 regex (mapped to .NET)" }, { "flag": "-U", "desc": "multiline" }, { "flag": "--multiline-dotall", "desc": "dot matches newline" }, { "flag": "-p", "desc": "pretty: color, heading, line numbers" }, { "flag": "--color", "desc": "never|auto|always|ansi" }, { "flag": "--colors", "desc": "color spec type:attr:value" }, { "flag": "--trim", "desc": "trim leading whitespace" }, { "flag": "--iglob", "desc": "case-insensitive glob" }, { "flag": "--count-matches", "desc": "count individual matches" }, { "flag": "--files-without-match", "desc": "files without a match" }, { "flag": "--heading", "desc": "group by file" }, { "flag": "--no-heading", "desc": "path on every line" }, { "flag": "--no-ignore", "desc": "ignore no files" }, { "flag": "-j", "desc": "threads (accepted)" } ], "rm": [ { "flag": "-r", "desc": "recursive" }, { "flag": "-f", "desc": "force" }, { "flag": "-v", "desc": "verbose" }, { "flag": "-d", "desc": "remove empty directories" }, { "flag": "-i", "desc": "prompt before every removal" }, { "flag": "-I", "desc": "prompt once before removing many files or recursing" }, { "flag": "--interactive", "desc": "prompt according to WHEN (never, once, always)", "arg": "WHEN" }, { "flag": "--one-file-system", "desc": "when removing recursively, skip directories on another filesystem" }, { "flag": "--preserve-root", "desc": "do not remove / (default); =all also refuses a directory on another device", "arg": "all" }, { "flag": "--no-preserve-root", "desc": "do not treat / specially (ps-bash still refuses to delete the root)" } ], "rmdir": [ { "flag": "-p", "desc": "parents" }, { "flag": "-v", "desc": "verbose" } ], "sed": [ { "flag": "-n", "desc": "suppress default" }, { "flag": "-i", "desc": "in-place" }, { "flag": "-E", "desc": "extended regex" }, { "flag": "-e", "desc": "expression" }, { "flag": "-f", "desc": "script file" }, { "flag": "-s", "desc": "separate files" }, { "flag": "-z", "desc": "NUL-separated records" }, { "flag": "-l", "desc": "line wrap length for l" }, { "flag": "--debug", "desc": "annotate program execution" } ], "seq": [ { "flag": "-s", "desc": "separator" }, { "flag": "-w", "desc": "equal width" } ], "sha1sum": [ { "flag": "-c", "desc": "check" }, { "flag": "-b", "desc": "binary mode" } ], "sha256sum": [ { "flag": "-c", "desc": "check" }, { "flag": "-b", "desc": "binary mode" } ], "shift": [ { "flag": "N", "desc": "shift by N positions" } ], "sleep": [ { "flag": "NUMBER", "desc": "seconds to sleep (suffix: s/m/h/d)" } ], "sort": [ { "flag": "-r", "desc": "reverse" }, { "flag": "-n", "desc": "numeric sort" }, { "flag": "-u", "desc": "unique" }, { "flag": "-f", "desc": "fold case" }, { "flag": "-k", "desc": "key field" }, { "flag": "-t", "desc": "field separator" }, { "flag": "-h", "desc": "human numeric" }, { "flag": "-V", "desc": "version sort" }, { "flag": "-M", "desc": "month sort" }, { "flag": "-c", "desc": "check sorted" } ], "source": [], "split": [ { "flag": "-l", "desc": "lines per file" }, { "flag": "-n", "desc": "CHUNKS output files: N, K/N, l/N, l/K/N, r/N, r/K/N" }, { "flag": "-d", "desc": "numeric suffixes" }, { "flag": "-a", "desc": "suffix length" }, { "flag": "-b", "desc": "bytes per file (K, M, G, KB, MB, KiB ...)", "arg": "SIZE" }, { "flag": "--numeric-suffixes", "desc": "numeric suffixes, optionally starting at FROM", "arg": "[=FROM]" }, { "flag": "--additional-suffix", "desc": "append SUFFIX to file names", "arg": "SUFFIX" } ], "stat": [ { "flag": "-c", "desc": "format string" }, { "flag": "-t", "desc": "terse" }, { "flag": "--printf", "desc": "printf format" } ], "strings": [ { "flag": "-n", "desc": "minimum string length" } ], "tac": [ { "flag": "-s", "desc": "separator" } ], "tail": [ { "flag": "-n", "desc": "number of lines" }, { "flag": "-f", "desc": "follow file for changes" }, { "flag": "-c", "desc": "output last N bytes" }, { "flag": "-s", "desc": "poll interval in seconds" } ], "tar": [ { "flag": "-c", "desc": "create archive" }, { "flag": "-x", "desc": "extract archive" }, { "flag": "-t", "desc": "list contents" }, { "flag": "-f", "desc": "archive file" }, { "flag": "-z", "desc": "gzip filter" }, { "flag": "-v", "desc": "verbose" }, { "flag": "-C", "desc": "change directory" }, { "flag": "--exclude", "desc": "exclude pattern" }, { "flag": "-T", "desc": "get names to extract or create from FILE", "arg": "FILE" }, { "flag": "-X", "desc": "exclude patterns listed in FILE", "arg": "FILE" }, { "flag": "--wildcards", "desc": "member names are glob patterns" }, { "flag": "--no-wildcards", "desc": "member names are literal" } ], "tee": [ { "flag": "-a", "desc": "append" } ], "time": [ { "flag": "COMMAND", "desc": "command to time" } ], "touch": [ { "flag": "-d", "desc": "date string" }, { "flag": "-t", "desc": "timestamp [[CC]YY]MMDDhhmm[.ss]", "arg": "STAMP" }, { "flag": "-r", "desc": "use this file's times", "arg": "FILE" }, { "flag": "-a", "desc": "change only the access time" }, { "flag": "-m", "desc": "change only the modification time" }, { "flag": "-c", "desc": "do not create any files" }, { "flag": "-h", "desc": "affect a symbolic link itself, not its target" }, { "flag": "--time", "desc": "change the named time (atime, access, use, mtime, modify)", "arg": "WORD" } ], "tput": [ { "flag": "CAPNAME", "desc": "terminal capability name" } ], "tr": [ { "flag": "-c", "desc": "complement" }, { "flag": "-C", "desc": "complement" }, { "flag": "-d", "desc": "delete" }, { "flag": "-s", "desc": "squeeze" }, { "flag": "-t", "desc": "truncate SET2" } ], "tree": [ { "flag": "-a", "desc": "all files" }, { "flag": "-d", "desc": "directories only" }, { "flag": "-L", "desc": "max depth" }, { "flag": "-I", "desc": "exclude pattern" }, { "flag": "--dirsfirst", "desc": "directories first" } ], "uname": [ { "flag": "-s", "desc": "kernel name" }, { "flag": "-n", "desc": "hostname" }, { "flag": "-r", "desc": "release" }, { "flag": "-m", "desc": "machine" }, { "flag": "-a", "desc": "all" } ], "unexpand": [ { "flag": "-t", "desc": "tab width" }, { "flag": "-a", "desc": "convert all spaces" } ], "uniq": [ { "flag": "-c", "desc": "count" }, { "flag": "-d", "desc": "duplicates only" }, { "flag": "-u", "desc": "unique lines only" }, { "flag": "-D", "desc": "print all duplicate lines", "arg": "[=METHOD]" }, { "flag": "-i", "desc": "ignore case" }, { "flag": "-f", "desc": "skip the first N fields", "arg": "N" }, { "flag": "-s", "desc": "skip the first N characters", "arg": "N" }, { "flag": "-w", "desc": "compare at most N characters", "arg": "N" }, { "flag": "-z", "desc": "line delimiter is NUL, not newline" }, { "flag": "--group", "desc": "separate groups with an empty line", "arg": "[=METHOD]" } ], "unset": [ { "flag": "-v", "desc": "treat each NAME as a variable" }, { "flag": "-f", "desc": "treat each NAME as a function" } ], "wc": [ { "flag": "-l", "desc": "line count" }, { "flag": "-w", "desc": "word count" }, { "flag": "-c", "desc": "byte count" }, { "flag": "-m", "desc": "character count" }, { "flag": "-L", "desc": "length of the longest line" } ], "which": [ { "flag": "-a", "desc": "show all matches" } ], "xan": [ { "flag": "-d", "desc": "delimiter" }, { "flag": "headers", "desc": "show column headers" }, { "flag": "count", "desc": "count rows" }, { "flag": "select", "desc": "select columns" }, { "flag": "search", "desc": "search rows" }, { "flag": "table", "desc": "pretty table display" } ], "xargs": [ { "flag": "-I", "desc": "replace string" }, { "flag": "-i", "desc": "replace string (default: {})" }, { "flag": "-n", "desc": "max args" }, { "flag": "-0", "desc": "null-delimited input" } ], "yes": [ { "flag": "STRING", "desc": "repeated output (default: y)" } ], "yq": [ { "flag": "-r", "desc": "raw output" }, { "flag": "-o", "desc": "output format (json, yaml)" } ] } |