home *** CD-ROM | disk | FTP | other *** search
/ Best Objectech Shareware Selections / UNTITLED.iso / boss / util / dos / 003 / quickref.doc < prev    next >
Encoding:
Text File  |  1992-04-21  |  15.8 KB  |  706 lines

  1.  
  2.  
  3.  
  4.  
  5.             
  6.                DOSNIX QUICK REFERENCE GUIDE
  7.             Copyr. 1991 by G. Vrooman
  8.                All rights reserved.
  9.                     
  10.  
  11.      
  12.  
  13.      GETTING STARTED:
  14.  
  15.       If you have a hard drive, make a directory named C:\DOSNIX
  16.     and copy the DOSNIX files into it.  To use DOSNIX from any
  17.     directory, you need the following statement in your AUTOEXEC.BAT
  18.     file:
  19.  
  20.            PATH = C:;C:\DOSNIX
  21.  
  22.       If you already have a path statement, add ;C:\DOSNIX to the
  23.     end of it.  If you don't have an AUTOEXEC.BAT file, you can
  24.     make one with any handy text editor.  The following line will
  25.     help you keep track of where you are on your hard drive:
  26.  
  27.         PROMPT $P$G
  28.  
  29.     This will make your current directory part of your prompt.
  30.  
  31.  
  32.       If you don't have a hard drive, you can make a bootable floppy 
  33.     disk with COMMAND.COM, FORMAT.COM, PRINT.COM and any other MSDOS 
  34.     utilities you need.  Copy as many DOSNIX utilities as you can to 
  35.     it and use it as a working disk.  
  36.  
  37.       If you have 640k of ram you can use part of it for a ram disk.
  38.     Make a bootable floppy disk with a directory named \BIN and copy 
  39.     all desired utilities to \BIN. Copy VDISK.SYS (some versions of MSDOS 
  40.     use RAMDISK.SYS) to the root directory and create the following files 
  41.     in the root directory:
  42.  
  43.         CONFIG.SYS:
  44.  
  45.                 files = 10
  46.                 buffers = 20
  47.                 device = vdisk.sys 256
  48.  
  49.  
  50.         AUTOEXEC.BAT:
  51.  
  52.             copy bin\*.* c:\
  53.             copy command.com c:\
  54.             copy cauto.bat c:\autoexec.bat
  55.             c:
  56.             command /p
  57.  
  58.  
  59.  
  60.  
  61.  
  62.         CAUTO.BAT:
  63.  
  64.             path = c:\
  65.             set COMSPEC = c:\command.com
  66.             prompt $p$g
  67.  
  68.  
  69.       When you boot your computer with this disk you will have a 256k 
  70.     ramdisk named C:, containing DOS and all your utilities.  You will 
  71.     still have 384k of free ram, and your floppy drives will now be free 
  72.     for other purposes.  If you have extended memory, you can use
  73.  
  74.             device = vdisk.sys 256 /e
  75.  
  76.     to configure your ram disk in extended memory.
  77.  
  78.  
  79.  
  80.     DOSNIX OPTIONS:
  81.  
  82.       Most DOSNIX commands have a simple format which can be enhanced 
  83.     by the use of UNIX style option strings.  The option string is always 
  84.     the first argument after the command and usually begins with a "-".  
  85.     See DOSNIX.DOC for the options available with each command.
  86.  
  87.       If you are used to MSDOS switches and find this awkward you can 
  88.     insert the following line in your AUTOEXEC.BAT file:
  89.  
  90.             SET SWITCH=/     (No space before or after "=")
  91.  
  92.     All commands except CHMOD and READ will recognize a "/" as an option 
  93.     delimiter.  If you don't use this feature, you can use slashes in 
  94.     path names, as in UNIX, and they will be converted to back slashes.
  95.  
  96.  
  97.     INSTANT HELP:
  98.  
  99.       DOSNIX.DOC has now been keyed for quick command searches and
  100.     a HELP.BAT file has been included.  To obtain on-line help, type 
  101.     "help" and the name of the subject with which you want help.  In
  102.     addition, a brief summary of most commands can be obtained by typing 
  103.     the name of the command followed by a "-?". 
  104.  
  105.  
  106.     
  107.     NOTE:
  108.  
  109.     UNIX is a registered trademark of AT&T corporation
  110.         MSDOS is a registered trademark of Microsoft corporation
  111.  
  112.  
  113.  
  114.                         
  115.  
  116.  
  117.             STANDARD INPUT (STDIN) AND STANDARD OUTPUT (STDOUT)
  118.  
  119.  
  120.       DOSNIX utilities make extensive use of STDIN and STDOUT.  STDIN
  121.     is the keyboard unless you decide to redirect it.  STDOUT is the
  122.     screen unless you decide to redirect it.  Redirection is done by
  123.     using the MSDOS operators; <, >, >> and |.
  124.  
  125.     <     used with a program that normally reads from STDIN.  It 
  126.         tells MSDOS to use the contents of a file for STDIN.
  127.         For example: 
  128.  
  129.             more < dosnix.doc
  130.  
  131.           
  132.     >    writes STDOUT to a file.  For example:
  133.  
  134.             cat dosnix.doc
  135.  
  136.         writes DOSNIX.DOC to the screen, while
  137.  
  138.             cat dosnix.doc > another.doc
  139.  
  140.         copies DOSNIX.DOC to ANOTHER.DOC.
  141.  
  142.  
  143.     >>    appends STDOUT to an existing file or writes STDOUT
  144.         to a new file.  For example:
  145.  
  146.             cat quickref.doc >> dosnix.doc
  147.  
  148.         appends QUICKREF.DOC to DOSNIX.DOC.  Unfortunately
  149.         this operator will leave an unwanted CTRL-Z between
  150.         the two files.  For this reason, DOSNIX includes an 
  151.         APP command.
  152.  
  153.  
  154.     |    The pipeline operator. Uses STDOUT as STDIN for a
  155.         second program.  For example:
  156.  
  157.             cat *.doc | read
  158.  
  159.         pipes all files with an extension of .DOC to READ.
  160.  
  161.  
  162.  
  163.       UNIX and DOSNIX provide an additional command, TEE, which
  164.     will write STDOUT to the screen and store it in a file at
  165.     the same time.  For example:
  166.  
  167.             cat dosnix.doc | tee another.doc
  168.  
  169.     writes DOSNIX.DOC to the screen and stores it in ANOTHER.DOC.
  170.  
  171.  
  172.  
  173.     
  174.  
  175.  
  176.  
  177.                         LIST OF DOSNIX COMMANDS
  178. -------------------------------------------------------------------------------
  179.  
  180.  
  181.         APP             append standard input to file(s).
  182.  
  183.         CAT             Copy text file(s) to standard output.
  184.  
  185.         CHMOD           Modify attribute(s) of file.
  186.  
  187.         CLR             Set screen foreground, background and border colors.
  188.  
  189.         CP              Copy file to new file or directory.
  190.  
  191.         CPDIR           Copy directory and all subdirectories. *
  192.  
  193.         DB              Delete all files except specified files.
  194.  
  195.     EDC        Easy Directory Change.
  196.  
  197.         FFIND           Find all copies of file in specified path.
  198.  
  199.         GET             Find all filenames containing specified string. *
  200.  
  201.         LS              List contents of directory.
  202.  
  203.         MV              Move file to new file or directory.
  204.  
  205.         MVDIR           Move directory and all subdirectories to new location.
  206.  
  207.         READ            Display text file in page format.
  208.  
  209.         RM              Remove file(s).
  210.  
  211.         RN              Rename file or directory.
  212.  
  213.     SGREP        Search files(s) for text. *
  214.  
  215.     SPLIT        Split a text file into smaller pieces. *
  216.  
  217.         TEE             Copy standard input to standard output and file(s).
  218.  
  219.         TOLOWER         Convert standard input to lower case.
  220.  
  221.         TOUCH           Modify file time and date.
  222.  
  223.         TOUPPER         Convert standard input to upper case.
  224.  
  225.  
  226.  
  227.         * DOSNIX ver. 1.2k
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.     CHANGING SCREEN COLORS:            (ver. 0.93+)
  235.  
  236.  
  237.     clr gre                    Changes screen color
  238.                         to green with black
  239.                         background and border.
  240.  
  241.     clr -b gre                Changes screen color to
  242.                         high intensity green with
  243.                         black background and border.
  244.  
  245.     clr blu whi                Changes screen color to
  246.                         blue with white background
  247.                         and border.
  248.  
  249.     clr -b whi blu whi            Changes screen color to
  250.                         high intensity white with 
  251.                         blue background    and white 
  252.                         border.
  253.  
  254.     clr bla whi                Changes screen color to
  255.                         black on white. (reverse
  256.                         video)
  257.  
  258.     clr                    Clears screen without
  259.                         resetting color attributes.
  260.  
  261.  
  262.  
  263.         Other colors:    red, cya, mag, yel, amb
  264.  
  265.  
  266.  
  267.     Hint:  Try "clr yel amb".  This combination is pleasing and won't
  268.            singe your eyeballs like some combinations.  
  269.  
  270.  
  271.     ANSI.SYS:
  272.  
  273.       ANSI.SYS is the MSDOS graphics device driver.  With ANSI.SYS, you  
  274.     can use CLS to clear the screen without losing your colors.  It is
  275.     also required with many communications programs to view ANSI graphics  
  276.     on bulletin boards.  To install ANSI.SYS, copy it to the root directory 
  277.     of your boot drive and add the following line to CONFIG.SYS:
  278.  
  279.             device = ansi.sys
  280.  
  281.  
  282.         
  283.  
  284.  
  285.  
  286.  
  287.  
  288.     LISTING FILES:
  289.  
  290.  
  291.     ls                    Lists all files in
  292.                         current directory in
  293.                         five column format.
  294.  
  295.     ls -l                    Lists all files in
  296.                         long format like 
  297.                         DOS DIR command.
  298.  
  299.     ls -lt                    Lists all files in
  300.                         long format, sorted
  301.                         by date, oldest files
  302.                         first.
  303.  
  304.     ls -lrt                    Lists all files in
  305.                         long format, most
  306.                         recent files first.
  307.  
  308.  
  309.     ls -le                    Lists all files in 
  310.                         long format, sorted
  311.                         by extension.
  312.  
  313.     ls \                    Lists all files in
  314.                         root directory.
  315.  
  316.     ls c:\cshow                lists all files in
  317.                         C:\CSHOW
  318.  
  319.     ls . \ c:\dosnix            Lists all files in current
  320.                         directory, root directory
  321.                         and C:\DOSNIX
  322.  
  323.     ls *.txt                Lists all files in current
  324.                         directory with an extension
  325.                         of .TXT
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.     LOCATING FILES:
  334.  
  335.  
  336.     ffind calvin.gif            Searches current drive for
  337.                         all copies of CALVIN.GIF.
  338.  
  339.     ffind c: calvin.gif            Searches drive C: for all
  340.                         copies of CALVIN.GIF.
  341.  
  342.     ffind *: wyeth.gif            Searches all hard drives for
  343.                         all copies of WYETH.GIF.
  344.     
  345.     ffind -f *: wyeth.gif            Searches all available drives
  346.                         for all copies of WYETH.GIF.
  347.  
  348.     ffind -r *.bak                Locates and removes all
  349.                         files with an extension
  350.                         of .BAK on current drive.
  351.  
  352.     ffind -i *: *.bak            Searches all drives for
  353.                         .BAK files and allows you
  354.                         choose which ones to delete.
  355.  
  356.     ffind -l list.txt            Locates all copies of LIST.TXT
  357.                         and displays attribute, size,
  358.                         date and time.
  359.  
  360.     ffind -m c: *.*                Finds all files on drive C:
  361.                         and displays totals for each
  362.                         subdirectory.
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.     CHANGING DIRECTORIES:
  370.  
  371.     cd \pcplus\downlds\utils        Changes directory to
  372.     edc util                \PCPLUS\DOWNLDS\UTILS
  373.  
  374.     cd d:\downlds\graphics\gif        Changes directory to
  375.     edc d:gif                D:\DOWNLDS\GRAPHICS\GIF
  376.  
  377.     edc -s                    Scans current drive and
  378.                         stores PATH.EDC in root
  379.                         directory. 
  380.  
  381.     edc -s d:gif                Scans drive D, stores copy
  382.                         of PATH.EDC in D:\ and
  383.                         changes directory to
  384.                         D:\DOWNLDS\GRAPHICS\GIF
  385.  
  386.         edc -t                    Displays directory tree
  387.                         while scanning.
  388.  
  389.     edc -l                      Displays a list of directories.
  390.  
  391.  
  392.  
  393.  
  394.  
  395.     COPYING FILES:
  396.  
  397.  
  398.     cp dosnix.doc dosnix.bak        Copies DOSNIX.DOC to
  399.                         DOSNIX.BAK.
  400.  
  401.     cp dosnix.doc \tempdir            Copies DOSNIX.DOC to
  402.                         \TEMPDIR.
  403.  
  404.     cp *.* \tempdir                Copies all files in
  405.     cp . \tempdir                current directory to
  406.                         \TEMPDIR.
  407.  
  408.     cp oldir newdir                Copies all files in
  409.                         OLDIR to NEWDIR.
  410.  
  411.     cp -i tempdir a:\            Lists all files in
  412.                         TEMPDIR and allows
  413.                         you to choose which
  414.                         ones to copy to A:\
  415.  
  416.     cp -m ted.asm \assmblr a:\source    Copies TED.ASM to \ASSMBLR
  417.                         and A:\SOURCE.
  418.  
  419.     cp -bco c:\text a:\            Copies only archive files in 
  420.                         C:\TEXT, clears archive bit
  421.                         and overwrites any previously
  422.                         existing files in A:\ .
  423.  
  424.                         
  425.  
  426.     MOVING FILES:
  427.  
  428.  
  429.     mv dosnix.bak dosnix.doc        Moves DOSNIX.BAK to
  430.     rn dosnix.bak dosnix.doc        DOSNIX.DOC.
  431.  
  432.     mv dosnix.doc \DOC            If \DOC is an existing
  433.     rn dosnix.doc \DOC            directory, moves DOSNIX.DOC
  434.                         to \DOC\DOSNIX.DOC, otherwise
  435.                         moves DOSNIX.DOC to a file
  436.                         named \DOC . 
  437.  
  438.     mv *.* \tempdir                moves all files in current
  439.     mv . \tempdir                directory to \TEMPDIR.
  440.  
  441.     mv oldir newdir                Moves all files in OLDIR 
  442.                         to NEWDIR.
  443.  
  444.     mv -i tempdir a:\            Lists all files in
  445.                         TEMPDIR and allows
  446.                         you to choose which
  447.                         ones to move to A:\
  448.  
  449.                         
  450.  
  451.  
  452.     MOVING DIRECTORIES:
  453.  
  454.  
  455.     mvdir oldir newdir            Renames OLDIR to NEWDIR.
  456.     rn oldir newdir
  457.  
  458.     mvdir \text \vde\text            Moves \TEXT to \VDE\TEXT
  459.  
  460.     mvdir c:\stuff a:\stuff            Moves C:\STUFF to A:\STUFF.
  461.                         If a disk full error occurs
  462.                         leaves C:\STUFF intact.
  463.  
  464.     mvdir c:\basic c:\basic\source          Generates error message.
  465.  
  466.  
  467.  
  468.  
  469.     REMOVING FILES:
  470.  
  471.  
  472.     rm dosnix.bak                Removes DOSNIX.BAK
  473.  
  474.     rm *.bak                Removes all .BAK files
  475.                         in current directory.
  476.  
  477.     rm -i *.*                Displays all files in
  478.                         current directory and
  479.                         allows you to choose
  480.                         which ones to delete.
  481.  
  482.     rm tempdir\*.*                Removes all files in
  483.                         TEMPDIR but leaves
  484.                         directory.
  485.  
  486.     rm -r tempdir                Removes TEMPDIR along
  487.                         with all files and sub-
  488.                         directories.
  489.  
  490.     rm -r a:\                Removes all files and
  491.                         directories on drive A:
  492.  
  493.     db dosnix94.zip                Deletes all files in
  494.                         current directory except
  495.                         DOSNIX94.ZIP.
  496.  
  497.     db *.c *.exe                Deletes all files except
  498.                         .C and .EXE files.
  499.  
  500.  
  501.  
  502.  
  503.  
  504.     MODIFYING FILE ATTRIBUTES AND TIMES:
  505.  
  506.  
  507.     touch dosnix.doc            Changes time and date of
  508.                         DOSNIX.DOC to current DOS
  509.                         time and date.
  510.  
  511.     touch *.*                Changes time and date of
  512.                         all files in directory to
  513.                         current DOS time and date.
  514.  
  515.     touch -t ted.com            TOUCH will prompt you
  516.                         for a time and date 
  517.                         before modifying TED.COM.
  518.  
  519.     touch -t 07/04/91;16:30:00 test.txt     Changes time and date of
  520.                         TEST.TXT to 4:30 PM, July 4, 
  521.                         1991.
  522.  
  523.     chmod -a *.*                Removes those pesky archive
  524.                         bits from all files in the
  525.                         current directory.
  526.  
  527.     chmod +a records.txt            Restores the archive bit to
  528.                         RECORDS.TXT, to remind you
  529.                         that you haven't backed it up.    
  530.  
  531.     chmod +r homework.txt            Makes HOMEWORK.TXT a read
  532.                         only file so your kid brother
  533.                         won't erase it by mistake.
  534.  
  535.     chmod +h vanna.gif            Hides VANNA.GIF so your wife
  536.                         or boss won't see it.
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.                 USING CAT, APP and TEE
  544.  
  545.  
  546.     cat > test.txt                Copies whatever is typed
  547.                         on the keyboard to TEST.TXT.
  548.                         Use CTRL-Z to quit.
  549.  
  550.     cat whats.new dosnix.doc        Writes WHATS.NEW and 
  551.                         DOSNIX.DOC to screen.
  552.  
  553.     cat whats.new dosnix.doc > docs.txt     Concatenates WHATS.NEW
  554.                         and DOSNIX.DOC and stores
  555.                         them in DOCS.TXT.
  556.  
  557.     cat *.c > csource.txt            Concatenates all files with
  558.                         an extension of .C and
  559.                         stores them in CSOURCE.TXT.
  560.  
  561.     cat newutil.c | app csource.txt        Appends NEWUTIL.C to
  562.     app < newutil.c csource.txt        CSOURCE.TXT.
  563.  
  564.     app < newutil.c > csource.txt        Totally destroys CSOURCE.TXT.
  565.  
  566.     cat newutil.c >> csource.txt        Appends NEWUTIL.C to
  567.                         CSOURCE.TXT but leaves
  568.                         a CTRL-Z between the two 
  569.                         files.
  570.  
  571.     cat *.c | tee csource.txt        Concatenates all files with
  572.                         an extension of .C and stores
  573.                         them in CSOURCE.TXT while
  574.                         writing them to the screen.
  575.  
  576.     cat *.c | tee csource.txt | read    Same as above except pipes
  577.                         screen output to READ.
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.             USING READ        (ver. 0.94f+)
  587.  
  588.  
  589.     read                    Reads from STDIN. Not
  590.                         very useful by itself.
  591.                         If you get stuck in this
  592.                         mode type CTRL-Z to get
  593.                         out.
  594.  
  595.     read dosnix.doc                Displays contents of
  596.                         DOSNIX.DOC.
  597.  
  598.     read whats.new dosnix.doc        Displays contents of
  599.                         WHATS.NEW and DOSNIX.DOC.
  600.  
  601.     read *.doc                Displays contents of all
  602.                         files with an extension
  603.                         of .DOC .
  604.  
  605.  
  606.  
  607.     KEYPAD COMMANDS:
  608.  
  609.  
  610.         PgDn                          Clears screen and displays
  611.                         next page.
  612.  
  613.     PgUp                    Clears screen and displays
  614.                         previous page.
  615.  
  616.  
  617.         Down Arrow                Displays next line.
  618.  
  619.     Up Arrow                Moves back one line.
  620.  
  621.     Right Arrow                Shifts screen one tab stop 
  622.                         right.
  623.  
  624.     Left Arrow                Shifts screen one tab stop left.
  625.  
  626.         Home, ^PgUp                       Moves to beginning of file.
  627.  
  628.         End, ^PgDn                   Moves to end of file.
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.     UNIX COMMANDS:
  638.  
  639.  
  640.         <space>                     Scrolls until spacebar is 
  641.                         pressed again. (Not quite
  642.                         UNIX).
  643.                         
  644.         ^D, D                       Displays next half page of text.
  645.  
  646.         Enter                         Displays next line of text.
  647.  
  648.         ^U, U                               Moves back one half page.
  649.  
  650.     ^B, B                      Clears screen and displays 
  651.                         previous page.
  652.  
  653.         H                           Displays help page.
  654.  
  655.         ^L, .                         Rewrites current page.
  656.  
  657.         $                        Moves to end of file.
  658.  
  659.         N                           Moves to next file.
  660.  
  661.         Q                           Terminates the program.
  662.     
  663.  
  664.     NOTE: ^ stands for Ctrl key.
  665.  
  666.  
  667.  
  668.  
  669.     NUMERIC AND SEARCH COMMANDS:
  670.  
  671.  
  672.  
  673.     -100                        Moves back 100 lines.
  674.  
  675.         +100                        Moves forward 100 lines.
  676.  
  677.         100                         Moves to line number 100.
  678.  
  679.  
  680.     \CHMOD                    Searches text for first
  681.                         occurrence of "CHMOD".
  682.  
  683.     /                    Searches text for next 
  684.                         occurrence of "CHMOD". 
  685.  
  686.  
  687.     ALTERNATE KEYS:
  688.  
  689.     F1, Backspace                           H, Display help screen.
  690.  
  691.     F10, Del                Escape
  692.  
  693.     [                    ^U, Move back one half page.
  694.  
  695.     ]                    ^D, Move down one half page.
  696.  
  697.     
  698.     
  699.  
  700.     NOTE: READ will maintain whatever color attribute is present when you run
  701.           it.  This means you can set your screen colors with CLR and then
  702.       use READ to view text files in whatever color you like.  READ will
  703.       determine appropriate highlight and menu bar colors.
  704.  
  705.  
  706.