Reference Section
ls Command Switches
--all (or -a)Shows all files, including . and ..
--almost-all (or -A)Shows all files except . and ..
--block-size=nShows the size of files as n-byte blocks
--classify (or -F)Appends a symbol to a filename to indicate its type
--color=tUses color for filenames, t equals never, always, or auto.
--dereference (or -L)Shows items referenced by symbolic links
--directory (or -d)Shows information about a directory instead of showing its contents
--dired (or -D)Output for emacs dired mode
--escape (or -b)Prints octal escape sequences for unprintable characters
--file-type (or -p)Same as --classify
--format=across (or -x)Sorts by lines instead of columns
--format=commas (or -m)Shows filenames as a list separated by commas
--format=long (or -l)Shows detailed (long) listings
--format=single-column (or -1)Shows results as one file per line
--format=verboseSame as the long format
--format=vertical (or -C)Lists entries by columns
--full-timeShows full date and time
--hide-control-chars (or -q)Displays a ? for unprintable characters in filenames
--human-readable (or -h)Shows sizes in kilobytes, megabytes, and so on, instead of raw bytes
--ignore=p (or -I)Ignores files matching the pattern p
--ignore-backups (or -B)Does not list files ending with ~
--indicator-style=classifySame as --classify
--indicator-style=noneDon't classify files
--indicator-style=file-typeSame as --file-type
--inode (or -i)Prints the inode number for the file
--kilobytes (or -k)Same as block size 1024
-fDoes not sort, enable -aU, disable -lst
--literal (or -N)Shows unprintable characters in names as-is (unlike -q)
--no-group (or -G)Hides the group that owns the file
--numeric-uid-gid (or -n)Shows UIDs and GIDs as numbers not names
-oShows long listings without the file group ownership information
--quote-name (or -Q)Encloses filenames in double quotes
--quoting-style=literalSame as --literal
--quoting-style=localeUses locale's quoting style around individual filenames
--quoting-style=shellUses shell quoting when necessary around individual filenames
--quoting-style=shell-alwaysAlways uses shell quoting around individual filenames
--quoting-style=cUses C string quoting around individual filenames
--quoting-style=escapeEscapes special characters with backslashes
--reverse (or -r)Reverses the sorting order
--recursive (or -R)Lists the contents of all subdirectories
--si (or -h)Similar to --human-readable, but uses powers of 1000 instead of 1024
--size (or -s)Prints the size in blocks
--sort=size (or -S)Sorts by file size
--sort=extension (or -X)Sorts by filename suffix
--sort=none (or -U)Sorts by the order the files are physically stored in their directory
--sort=time (or -t)Sorts by time. By default, --time=ctime
--sort=version (or -v)Sorts alphabetically, taking into account GNU version number conventions
--time=atime (or u)Sorts by access time
--time=accessSame as atime
--time=useSame as ctime
--time=ctime (or -c)Shows change time; sorts by change time if -t
--time=statusSame as ctime
--tabsize=n (or -T)Assumes Tab stops are every n characters instead of eight characters
--width=n (or -w)Assumes screen is n characters wide instead of what it actually is
printf Formatting Codes
%bExpands backslash sequences
%cDisplays a single character
%dDisplays a signed number
%eDisplays a floating-point number, exponential (also called scientific) notation
%fDisplays a floating-point number
%gUses %f or %e depending on the value
%iSame as %d
%oDisplays an octal number
%qQuotes the string so it can be read properly by a shell script
%sDisplays an unquoted string
%uDisplays an unsigned number
%xDisplays an unsigned hexadecimal number, using lowercase letters
%XDisplays an unsigned hexadecimal number, using uppercase letters
%%Displays a percent sign
printf Backslash Codes
\bBackspace
\fForm feed (that is, eject a page on a printer)
\nStart a new line
\rCarriage return
\tTab
\vVertical tab
\'Single quote character (for compatibility with C)
\\Backslash
\0nn is an octal number representing an 8-bit ASCII character
rm Command Switches
--directory (or -d)Removes the directory
--force (or -f)Never prompts the user and ignores missing files
--interactive (or -i)Always prompts the user
--recursive (or -r or -R)remove contents of all subdirectories
cp Command Switches
--archive (or -a)Same as -dpR
--backup (or -b)Makes a backup of any existing file before overwriting by adding a ~ to the name
--backup=none/offNever makes numbered backups
--backup=numbered/tAlways makes numbered backups
--backup=existing/nulMakes numbered backups if they already exist; otherwise make tilde backups
--backup=simple/neverAlways makes tilde backups
--no-dereference (or -d)Preserves links
--force (or -f)Never prompts the user; always overwrites
--interactive (or -i)Always prompts the user
--link (or -l)Creates a hard link instead of copying
--preserve (or -p)Preserves file attributes and ownership if possible
--parents (or -P)Appends the source path to the destination directory
--recursive (or -R)Copies any subdirectories
-rSimilar to --recursive, but doesn't include special handling of pipes and other files that cannot be copied properly
--sparse=wTruncates sparse files (w=never), creates them in full (w=always), or truncates at the command's discretion (w=auto, default).
--strip-trailing-slashesRemoves trailing slashes from the pathnames of the files to copy
--symbolic-link (or -s)Creates a symbolic link instead of copying
--suffix=s (or -S s)Replaces pathname suffix with new suffix s
--target-directory=dCopies files to directory d
--update (or -u)Overwrites old files or copies missing files
--one-file-system (or -x)Stays on the current file system
mv Command Switches
--backup (or -b)Makes a backup of any existing file before overwriting by adding a ~ to the name
--backup=none/offNever makes numbered backups
--backup=numbered/tAlways makes numbered backups
--backup=existing/nulMake numbered backups if they already exist; otherwise make tilde backups
--backup=simple/neverAlways make tilde backups
--force (or -f)Never prompts the user; always overwrites
--interactive (or -i)Always prompts the user
--strip-trailing-slashesRemoves trailing slashes from the pathnames of the files to copy
--suffix=s (or -S)Replaces pathname suffix with new suffix s
--target-directory=dCopies files to directory d
--update (or -u)Overwrites old files or copies missing files