home *** CD-ROM | disk | FTP | other *** search
- basename - Display file namename
-
- usage: basename string [suffix]
-
- Display file name. If suffix is supplied and matches the suffix on the
- filename, the suffix is stripped from the filename.
-
- bmgrep - Bmgrep is a fast pattern matching utility, intended to be almost
- identical in functionality to fgrep (ugh!) but much faster. It uses
- the Boyer-Moore algorithm.
-
- usage: bmgrep [-chlnsx1] [-e pattern] [-f file] pattern files
-
- -c: Count of matching lines
- -h: No filenames in output
- -l: List of files containing the pattern
- -n: Character offset of the pattern
- -s: Silent mode
- -x: Only lines which match entirely
- -1: Stop search after first match
-
-
- cal - Display calendar
-
- usage: cal [month] year
-
- Display the calendar for month year. If month not supplied, display
- the full year calendar. Note: month can be the month number or name;
- 93 is 93 AD not 1993.
-
-
- cat - Concatenate files
-
- usage: cat [-usvtenqbTB] files
-
- -q: No error reports
- -u: Unbuffered output
- -s: Strip multiple blank lines
- -v: Print control characters as ^X
- -t: Print tabs as ^T
- -e: Print $ at end of line
- -n: Print line number
- -b: Print block number
- -T: Force stdout into text mode (CR/LF translation)
- -B: Force stdout into binary mode (no CR/LF translation)
-
-
- cdiff - Context difference
-
- usage: cdiff old new
-
-
- cgrep - Search file for pattern and display context
-
- usage: cgrep [-vcilnbs] [-a|w lines] [-e string] [-f file] [string] [files..]
-
- -a num Set the number of lines to be displayed before (if num is
- negative) or after (if num is positive) the matched line.
- -w num Set the size of the context window.
- -v: All lines but those matching are printed.
- -c: Only a count of matching lines is printed.
- -i: Ignore upper/lower case distinction during comparisons.
- -l: Only the names of files with matching lines are listed (once),
- separated by new-lines.
- -n: Each line is preceded by its relative line number in the file.
- -b: Each line is preceded by the block number on which it was found.
- This is sometimes useful in locating disk block numbers by
- context.
- -s: The error messages produced for nonexistent or unreadable files
- are suppressed.
- -e expression
- Same as a simple expression argument, but useful when the
- expression begins with a -.
- -f file The regular expression list is taken from the file.
-
-
- chmod - Change file attributes
-
- usage: chmod [-R] [absolute-mode | symbolic-mode | string-mode] files
-
- -R: Recurse down directories
-
- symbolic mode
-
- A symbolic mode has the form
-
- [who] op permission [op permission ...]
-
- The who value is any combination of the following:
-
- u Sets user permissions.
- g Sets group permissions.
- o Sets other permissions.
- a Sets all permissions; this is the default.
-
- Group and Other permissions are mapped to user permissions on MSDOS
- and OS/2.
-
- The op value gives the action to take:
-
- + Turns on a permission.
- - Turns off a permission.
- = Turns on the specified permissions and turns off all others.
-
- The permission value is any combination of the following:
-
- r Read permission. Ignored for MSDOS & OS/2
- x Execute permission. Ignored for MSDOS & OS/2
- w Write permission.
- h HIDDEN attribute.
- a ARCHIVE attribute.
- s Setuid/Setgid bit. On MSDOS and OS/2 this maps to the
- SYSTEM attribute.
- t Text bit. On MSDOS and OS/2 this maps to the ARCHIVED
- attribute.
-
- absolute mode
-
- A octal value made up using by ORing the following values. Note
- that some values may be invalid. These are translated into the
- appropriate MSDOS/OS2 values.
-
- 4000 HIDDEN Attribute
- 2000 SYSTEM Attribute
- 1000 ARCHIVE Attribute
- 0400 User read. Ignored on MSDOS and OS/2
- 0200 User write
- 0100 User execute. Ignored on MSDOS and OS/2
- 0040 Group read. Ignored on MSDOS and OS/2
- 0020 Group write (mapped to user write attribute).
- 0010 Group execute. Ignored on MSDOS and OS/2
- 0004 Other read. Ignored on MSDOS and OS/2
- 0002 Other write (mapped to user write attribute).
- 0001 Other execute. Ignored on MSDOS and OS/2
-
- If the last character is a d (as in 001d), the absolute DOS
- values listed below are assumed and no translation takes place.
-
- 001 - Read only
- 002 - Hidden
- 004 - system
- 040 - Archived
-
- string mode
- A string matching the output long form for the mode from ls is
- required (rxw------, for example).
-
-
- cmp - Compare two files
-
- usage: cmp [-ls] file1 file2
-
- -l: Report all differences
- -s: Silent mode. exit code of 1 if there are differences
-
-
- comm - select or reject lines common to two sorted files
-
- usage: comm [-[123]] file1 file2
-
- -1: Reject column 1
- -2: Reject column 2
- -3: Reject column 3
-
-
- cp - Copy files.
-
- usage: cp [-ipfCrRvn] f1 f2
- cp [-ipfCrRvn] f1 ... fn d1
- cp [-ipfCrRvn] d1 d2
-
- -i: Ask before copying
- -r: Recurse down directories, copying tree to new location
- -R: Recurse down directories, copying tree to new location
- -v: verbose
- -n: show me what you're going to do, without doing it.
- -p: preserve access times
- -C: Convert sources files from MSDOS format to UNIX format
- -f: Force removal of destination files
-
-
- cpio - Archive files
-
- usage: cpio -o [ -acxBTvk ] [ -O <output file> ]
- -i [ -BTxcdmrtuvfsSb6 ] [ -I <input file> ] [ patterns ]
- -p [ -adrxlmuv ] directory
-
- -o: Output mode
- -i: Input mode
- -p: Pass mode
- -a: Reset access time
- -T: No swapping in header
- -k: Skip corrupt start of tape
- -c: ASCII header
- -B: 5120 byte buffer
- -v: Verbose flag
- -d: Create directories
- -x: Process special files
- -h: Process symbolic links
- -m: Reset modification time
- -r: Rename
- -t: Print table of contents
- -u: Copy unconditionally
- -f: Copy not matching
- -s: Swap bytes
- -S: Swap half words
- -b: Swap bytes and half words
- -6: Unix 6th edition
- -l: Link when possible
- -I file: Use file as input instead of stdin
- -O file: Use file as output instead of stdout
-
-
- csplit - Context or line file splitter
-
- usage: csplit [-s] [-k] [-nnumber] [-f prefix] file args ...
-
- -s: Suppress printing of character counts
- -k: Do not delete created files on error
- -f prefix Prefix for created files (default: xx)
- -n number Maximum number of files to create (default 99)
-
-
- cut - Cut data out of a file
-
-
- usage: cut [ -f{args} [-s] [-d separator ] ] | [ -c{args} ] [filename [...]]
-
- -f{args}: Comma separated list of fields to extract
- -d separator: Field separator (default tab)
- -s: Skip lines with no fields
- -c{args}: Comma separater list of columns to extract
-
-
- date - Display / change date and time
-
- usage: date [-q] [+format] [[MMDDYY]hhmm[ss]]
-
- -q:
- +format: Display date/time using specified format string
-
- If a new date/time is supplied (last parameter), the system date and
- time is updated.
-
- The format string is constructed as for the library function strftime
- (cf printf). The following format specifiers are supported:
-
- a Short day name
- A Full day name
- b Short month name
- B Full month name
- c Date and Time (%x %X)
- d Day of month, 2 digits
- D Long date (%d/%m/%y)
- E Era name and year
- F Full month name
- h Short month name
- H 24 Hour, 2 digits
- I 12 Hour, 2 digits
- j Day of year, 3 digits
- m Month number, 2 digits
- M Minute number, 2 digits
- n Newline character
- o Era year (from 0)
- N Era name (AD)
- p AM/PM
- r 12 hour Time (%I:%M:%S %p)
- S Second number, 2 digits
- t Tab character
- T 24 Hour Time (%H:%M:%S)
- U Sunday Week of year, 2 digits
- w Weekday number, 2 digits
- W Monday Week of year, 2 digits
- x Short date (%d/%m)
- X Short Time (%I:%M)
- y Year number, 2 digits
- Y Year number, 4 digits
- Z Time zone
- z Time zone
-
- Field justification and precision can be specified in a similar
- manner to that in printf using digits, . and -. Any specified
- field width/precision overrides the default.
-
- % Format symbol
- . Precision
- - Left Justified
- number Before a precision, the field width. After a precision,
- the field precision. Thus %6.5I for 1400 hours gives
- ' 00014'.
-
-
- dd - Data copy
-
- usage: dd [ ibs=numeric ] [ obs=numeric ] [ cbs=numeric ] [ bs=numeric ]
- [ if=filename ] [ of=filename ] [ skip=numeric ] [ seek=numeric ]
- [ count=numeric ] [ files=numeric ]
- [ conv=[lcase,ucase,noerror,sync,swab,ascii,ebcdic,ibm] ]
-
- ibs Input block size
- obs Output Block size
- cbs Conversion block size
- bs Block size
- if Input filename (default: stdin)
- of Output filename (default: stdout)
- skip Number of input records to skip
- seek Number of output records to seek over
- count Number of records to transfer
- files Number of files to process
- conv Convert data to
- lcase - lower case
- ucase - upper cas
- noerror - ignore errors
- sync -
- swab - Swap bytes
- ascii - ASCII
- ebcdic - EBCDIC
- ibm - IBM EBCDIC
-
-
- df - Display Disk Free space
-
- usage: df [ -bit] drives
-
- -b: Display in BSD format (kbytes)
- -i: Display cluster information
- -t: Display totals
- -c: Display drive information
-
-
- diff - Display differences between two text files.
-
- usage: diff [ -bceinT ] [ -o output file ] file1 file2
-
- -b Remove trailing whitespace (blanks and tabs) and compress all
- other strings of whitespace to a single blank.
- -c Print some context -- matching lines before and after the
- non-match section. Mark non-matched sections with "|".
- -e Output is in an "editor script" format which is compatible
- with the Unix 'ed' editor.
- -i Ignore lower/upper case distinctions.
- -n Output is in an RCS style format for use with RCS tools.
- -o outfile Place output in file "outfile" rather than on stdout.
- -T Print timings
-
-
- dirname - Extract directory name from filename
-
- usage: dirname filename
-
-
- du - Display disk usage
-
- usage: du [-arsk] [startdir]
-
- -a: Display all entries instead of just directory entries
- -r: Report errors
- -s: Only display top level values
- -k: Display Kilobyte usage as well
-
-
- expr - evaluate arguments as expression
-
- usage: expr expression..
-
- The supported operators are |, &, =, >, >=, <, <=, !=, +, -, *, /, %
- and : and ().
-
-
- fgrep - Search file for string
-
- usage: fgrep [-vxcilnbs] [-e string] [-f file] [string] [files..]
-
- -x: Report only lines which exactly match the string.
- -v: All lines but those matching are printed.
- -c: Only a count of matching lines is printed.
- -i: Ignore upper/lower case distinction during comparisons.
- -l: Only the names of files with matching lines are listed (once),
- separated by new-lines.
- -n: Each line is preceded by its relative line number in the file.
- -b: Each line is preceded by the block number on which it was found.
- This is sometimes useful in locating disk block numbers by
- context.
- -s: The error messages produced for nonexistent or unreadable files
- are suppressed.
- -e expression
- Same as a simple expression argument, but useful when the
- expression begins with a -.
- -f file The regular expression list is taken from the file.
-
-
- find - Search directory tree for files matching requirements
-
- usage: find path-list predicate-list
- Predicate list: [ -name filename ] [ -perm permissions ]
- [ -type [bcdfpnlsM] ] [ -links number ]
- [ -user username ] [ -group groupname ]
- [ -size number[bkc] [ -inum inode ]
- [ -[acm]time days.HHMMSS ]
- [ -[exec | ok ] command string ; ]
- [ -newer[acm][acm] file ] [ -path path ]
- [ -depth ] [ -print ] [ -mountstop ]
- [ -prune ] [ -only ] [ -follow ]
- [ -msdos ] [ -pmask permissions mask ]
- [ -cpio|ncpio device ] [ -ls ] [ -icase ]
- [ -nogroup ] [ -nouser ] [ -xdev ]
- Operator list: [ -a -o ( ) ! ]
-
- Predicates
-
- -name filename: Match this file name. Shell wild
- cards can be used.
- -perm permissions Match Permissions
- -type [bcdfpnlsM] Match only files of specified type
- -links number Match number of links
- -user username Match owner
- -group groupname Match group
- -size number[bkc] Match file size
- -inum inode Match inode number
- -[acm]time days.HHMMSS Match create/access modification time
- -[exec | ok] command string ;
- Execute command string
- -newer[acm][acm] file Compare create/access/modification
- time with reference file
- -path path Match full path using wild cards
- -depth Depth first search
- -print Print a match
- -mountstop Do not cross mount points
- -prune Prune directories
- -only Only follow directories
- -follow Follow symbolic links
- -msdos Output MSDOS format names
- -pmask permissions mask Test file permissions to see if a
- any of permissions mask is set.
- -cpio | ncpio device Write file to stdout in CPIO format
- -ls Print file information in ls format
- -icase Ignore case on name match
- -nogroup Match if file's group name does not
- exist
- -nouser Match if file's owner name does not
- exist
- -xdev Do not go cross mount points
-
- Predicates can be joined using the following operators
-
- -a And
- -o Or
- ! Not
- ( Start subexpression
- ) End subexpression
-
-
- fold - Fold long lines to stdout
-
- usage: fold -width files..
-
- -width Maximum line length (default 80)
-
-
- fstat - Print file status information
-
- usage: fstat filename
-
-
- grep - Search file for pattern
-
- usage: grep [-vcilnbs] [-e string] [-f file] [string] [files..]
-
- -v: All lines but those matching are printed.
- -c: Only a count of matching lines is printed.
- -i: Ignore upper/lower case distinction during comparisons.
- -l: Only the names of files with matching lines are listed (once),
- separated by new-lines.
- -n: Each line is preceded by its relative line number in the file.
- -b: Each line is preceded by the block number on which it was found.
- This is sometimes useful in locating disk block numbers by
- context.
- -s: The error messages produced for nonexistent or unreadable files
- are suppressed.
- -e expression
- Same as a simple expression argument, but useful when the
- expression begins with a -.
- -f file The regular expression list is taken from the file.
-
-
- head - display file headers
-
- usage: head [-n] [file ...]
-
- -n: Number of lines to display (n is a number)
-
-
- ls - List directory
-
- Note: Not all the options are meaning full on MSDOS.
-
- usage: ls [-xutsrpqonmligfdcbaACFRS1] [file list]
-
- -A: List all files
- -F: Append file type to filename (/ directory, * executable)
- -C: Use column output
- -R: Recurse down directory tree
- -S: Sort on size
- -1: Output as a single column
- -x: Output as multiple columns
- -u: Display access times, not modification times
- -t: Sort on time
- -s: Display number of blocks
- -r: Reverse sort order
- -p: Append / to directories
- -q: Display non-printing characters as ?
- -o: Display file owner
- -n: Display owner/group as numeric ids
- -m: Display in columns using , as the separator
- -l: Long format
- -i: Display inode
- -g: Display file group
- -f: Assume the file is a directory
- -d: Do not recurse down a directory
- -c: Display creation times, not modification times
- -b: Display non-printing characters as \value
- -a: Suppress files beginning with a dot
-
-
- m4 - M4 Macro processor
-
- usage: m4 [-es] [-Tsize] [-Bsize] [-Ssize] [-Hsize] [-Dname[=val]] [-Uname] [files..]
-
- -e: Operate interactively
- -s: Enable line sync output
- -T size: Set token buffer size to size.
- -B size: Set argument buffer size to size.
- -S size: Set call stack size to size.
- -H size: Set hash table size to size.
- -D name=.. Define name value
- -U name Undefine name
-
-
- make - Makefile processor (supports swapping a la shell)
-
- usage: make [-f makefile] [-inpqrst] [macro=val ...] [target(s) ...]
-
- -f name: Makefile name (default makefile)
- -i: Ignore exit status
- -n: Pretend to make
- -p: Print all macros & targets
- -q: Question up-to-dateness of target. Return exit status 1 if not
- -r: Don't not use inbuilt rules
- -s: Make silently
- -t: Touch files instead of making them
- -d: Debug
- -e: Override with environment variables
- -k: Skip tree
-
- Note: Make sure the rulefile is installed in the same directory as
- make.exe.
-
-
- mkdir - Make path
-
- usage: mkdir -p directory
-
- -p: Make intermediate directories in path
-
-
- mv - Move files.
-
- usage: mv [-ipfrRvn] f1 f2
- mv [-ipfrRvn] f1 ... fn d1
- mv [-ipfrRvn] d1 d2
-
- -i: Ask before copying
- -r: Recurse down directories, copying tree to new location
- -R: Recurse down directories, copying tree to new location
- -v: Verbose
- -n: Show me what you're going to do, without doing it.
- -p: Preserve access times
- -f: Force removal of destination files
-
-
- od - octal dump
-
- usage: od [-bcdhox] [file] [ [+] offset [.] [b] ]
-
- -b: Display bytes in octal
- -c: Display bytes as characters
- -d: Display bytes in decimal
- -h: Display bytes in hexadecimal
- -o: Display words in octal
- -x: Display words in hexadecimal
-
- offset Start offset (in octal) in file
- (b - offset is in blocks)
- (. interprete offset in decimal)
-
-
- printarg - Print argumnents to stdout
-
- usage: printarg
-
-
- printenv - Print environment to stdout
-
- usage: printenv
-
-
- rm - Remove files
-
- usage: rm [ -fir ] file...
-
- -f: Force removal
- -i: Ask user first
- -r: Recurse down directories (beware the dread rm -rf /*).
-
-
- rmdir - Remove directories
-
- usage: rmdir [ -p ] path..
-
- -p: Remove all directories on path
-
-
- setschar - Set switch character
-
- usage: setschar [ character ]
-
- Display or set (character provided) the switch character.
-
-
- sleep - Wait for n seconds
-
- usage: sleep seconds
-
-
- sort - Sort files
-
- usage: sort [ -cmu ] [ -t separator] [ -y record size] [ -z memory size ]
- [-o output file] [ -T directory ] [ -bdfinrM ]
- [[+StartField.Offset[bdfinrM] [-EndField.Offset]] [file] ...
-
- If any of the following flags can be applied globally or to a particular
- field (appended to the startfield address):
-
- -b: Skip leading blanks
- -d: Sort to dictionary order. Only letters, digits, comma's and points
- are compared.
- -f: Fold upper case to lower.
- -i: Ignore chars outside ASCII range (040 - 0176)
- -n: Sort to numeric value (optional decimal point) implies -b
- -r: Reverse the sense of comparisons.
- -M: Month order
-
- I/O control flags are:
-
- -u: Print uniq lines only once.
- -c: Check if files are sorted in order.
- -m: Merge already sorted files.
- -o outfile: Name of output file. (Can be one of the input files). Default
- is stdout.
- -: Take stdin as input.
-
- Fields:
-
- -t'x': Field separating character is 'x'
- +a.b: Start comparing at field 'a' with offset 'b'. A missing 'b' is
- taken to be 0.
- -a.b: Stop comparing at field 'a' with offset 'b'. A missing 'b' is
- taken to be 0. A missing -a.b means the rest of the line.
-
-
- split - Split file into n line parts
-
- usage: split [-n] [file [name]].
-
- -number: Part size in lines (default: 1000)
- file: The file to split
- name: The prefix for the parts (default: x).
-
-
- strings - Display the strings in files
-
- usage: strings -aopc -min_length files...
-
- -a: No used
- -o: Output offset of string
- -p: Output filename for string
- -c: No used
- -min_length The minimum string length
-
-
- sym - Display symbolic information from object and library files
-
- usage: sym [ -acegilnpstxzI ] filename
-
- -z: Zero suppress mode
- -t: Print comments
- -p: Print publics
- -e: Print externals
- -g: Print groups
- -c: Print classes
- -s: Print segments
- -n: Print name record
- -l: Sort by address
- -i: Ignore case on sorting
- -I: Ignore unknown records
- -x: Sort by length
- -d: Debug mode
-
-
- tail - Print tail of file
-
- usage: tail [+/-[number][lcbf]] [file]
-
- +/-number Number of lines (l, default), characters (c), blocks (b) to
- print from the end (-) or start (+) of the file.
- -f Wait 1 second at EOF and try reading again.
-
-
- tee - Pipe fit a pipeline. Copy stdin to one or more files and standard
- output.
-
- usage: tee [-i] [-a] [files].
-
- -i: Interrupt turned off.
- -a: Append to outputfile(s), instead of overwriting them.
-
-
- touch - Change a file's timestamp or size
-
- usage: touch [-amc] [-s newsize] [-t mmddhhmm[CC]yy.ss] [-f ref_file] file...
- -a: Change the access time
- -m: Change the modification time
- -c: Change the create time
- -s newsize: Change the file size to newsize
- -t time: Use this as the timestamp
- -f ref_file: Use the reference file (ref_file) for the timestamps.
-
-
- tput - Output a termcap string
-
- usage: tput [-Ttype] capname
-
- -Ttype: Usage terminal name type. Default is the value of TERM
- environment variable.
- capname: The termcap capability name for the terminal attribute.
-
-
- tr - Translate characters
-
- usage: tr [-cds] string1 string2 files
-
- -c: Take complement of string1
- -d: Delete input characters coded string1
- -s: Squeeze multiple output characters of string2 into one character
-
-
- uniq - Display unique lines
-
- usage: uniq [-udc] [+n] [-n] [input [output]]
-
-
- wc - Count number of words in file
-
- usage: wc [-lwc] [name ...]
-
- -l: Display only the line count
- -w: Display only the word count
- -c: Display only the character count
-
-
- which - Display the directory containing a command from the PATH
-
- usage: which [-i] [-a] [--] [<command>]
-
- -i: Read commands from stdin
- -a: Display all commands found on the PATH
-