Berkeley Logo


40 Unix Commands | Examples | Download
The Berkeley Utilities manual on-line
download the manual in pdf (396,100 bytes, Feb. 12, 2001)
The Berkeley Utilities (currently Version 2.0) are a set of


40 unix commands ported to DOS:

    awk string processing language download (46,283 bytes, May. 12, 1991) .
    basename extract base part from pathname of a file or directory download (16,712 bytes, Feb. 02, 2001) .
    cal display the calendar for a year or a month download (12,258 bytes, Feb. 02, 2001) .
    cat concatenate files download (16,985 bytes, Feb. 02, 2001) .
    cb C beautifier download (17,253 bytes, Feb. 12, 2001) .
    cmp binary file comparison download (17,549 bytes, Feb. 02, 2001) .
    comm look for common lines in 2 files download (13,080 bytes, Feb. 02, 2001) .
    cp copy files and directories download (23,913 bytes, Feb. 02, 2001) .
    cut cut out columns or fields from files download (17,544 bytes, Feb. 12, 2001) .
    df statistics on disk usage download (13,570 bytes, Feb. 02, 2001) .
    diff compare files and directories download (24,151 bytes, Sep. 11, 1993) .
    dtree display tree structure of directory download (17,725 bytes, Feb. 02, 2001) .
    du display space each directory takes download (18,434 bytes, Feb. 02, 2001) .
    ech echo arguments download (17,034 bytes, Feb. 02, 2001) .
    ed line editor download (29,820 bytes, Aug. 16, 1992) .
    expand expands tabs into blanks download (16,843 bytes, Feb. 02, 2001) .
    find find files with certain properties and execute commands on each download (21,058 bytes, Feb. 02, 2001) .
    grep search for patterns in files download (22,460 bytes, Feb. 02, 2001) .
    head display the beginning of one or several files download (16,883 bytes, Feb. 02, 2001) .
    join relational join of two files download (14,153 bytes, Feb. 12, 2001) .
    ls list files and directories download (21,677 bytes, Feb. 02, 2001) .
    make update files download (29,412 bytes, Aug. 19, 1992) .
    more text files browser download (39,581 bytes, Feb. 12, 2001) .
    mv move files and directories download (23,903 bytes, Feb. 02, 2001) .
    od octal (or hexadecimal) dump download (19,986 bytes, Feb. 02, 2001) .
    opts Set default options for the Berkeley Utilities download (31,997 bytes, Apr. 29, 1996) .
    paste merge files as columns of a single file download (17,482 bytes, Feb. 12, 2001) .
    rederr redirect error output of commands download (14,503 bytes, Feb. 02, 2001) .
    rm remove files and directories download (20,995 bytes, Feb. 02, 2001) .
    sed stream editor download (21,410 bytes, Aug. 16, 1992) .
    sort sort files download (23,193 bytes, Feb. 02, 2001) .
    split split a file into smaller pieces download (13,077 bytes, Feb. 02, 2001) .
    tail display the end of a file download (18,302 bytes, Feb. 02, 2001) .
    tee pipe connection and derivation download (16,749 bytes, Feb. 02, 2001) .
    touch update file timestamp download (19,222 bytes, Feb. 11, 2001) .
    tr translate standard in to standard out download (13,008 bytes, Feb. 02, 2001) .
    unexpand compress to tabs runs of blanks and tabs download (16,930 bytes, Feb. 12, 2001) .
    uniq weed out or find duplicate lines in a sorted file download (13,470 bytes, Feb. 02, 2001) .
    wc count words and lines download (17,124 bytes, Feb. 02, 2001) .
    which find which version of a program is active download (15,340 bytes, Feb. 11, 2001) .
    xstr extract character strings from C programs download (22,727 bytes, Feb. 11, 2001) .

The Berkeley Utilities follow rigorously the unix System V syntax and include all the options found on any unix system plus a few carefully chosen ones. They used to sell for $ 200 and are now free.

Back to Top

Examples of situations you might face:

  • You wonder if all the "doc" files with a name starting with a letter between a and f and located below the current directory would fit on your somewhat filled diskette in the A: drive, so you just type

    ls .//[a-f]*.doc -Ua
ls output

The answer is yes, they will just fit because 74.18 percent is less than 79.55 percent.
  • You want to create a file called new with the first 200 lines, the last 40 lines, the first 7 columns of file abc.dat, so you just type:
    head -200 abc.dat > new
    tail -40 abc.dat > new
    cut -c 1-7 abc.dat > new
  • You want to take all the ``C'' files on your hard disk which are less than seven days old and pkzip them into your backup.zip file:
    find . -name *.c -mtime -7 -exec pkzip -a backup {} ;
  • find output

  • You want to delete your windows subdirectory or all the files in the current directory with a filename ending with the letter a
    (please don't try DOS's "DEL *a.*"), so you type:
    rm -r \windows
    rm *a.*
  • Where does the string xyz343 occur in my ``C'' code? Where does the string alarm, regardless of case, occur in my ``MSH'' files?
    grep xyz343 *.c
    grep -i alarm *.msh
  • grep output

  • I have almost finished writing the DELTA2 manual (in LaTeX, hence in ASCII form) and I want to know how many times I have used each english word:
    cat manual.tex | tr -cs A-Za-z \n | sort | uniq -c
    so that I now know that ``You'' appears 48 times while ``you'' appears 201 times! This list is hardly comprehensive, it just tries to convey the flavor of this powerful toolbox.
    Back to Top

    Download the Berkeley Utilities plus the .pdf reference manual as a single zip file:

    download (1,173,659 bytes, Feb. 12, 2001) .

    Back to Top

  • OPENetwork Delta map The Berkeley Utilities Shareware & Freeware Our People The Game of Go Links
    OPENetwork | Delta | Berkeley Utilities | Shareware & Freeware | Our People | Game of Go | Map of Site | Links


    Last updated on Feb. 2, 2001
    Please send any comments to Jean-Claude Chetrit