Dos and Unix commands

  • DOS: On PCs, start the MS-DOS Prompt window. On Windows systems, the MS-DOS is in c:\windows\DOSPRMPT.
  • Unix: Start the shell window.
  • Mac OSX: Unix-like. Start the Terminal window (in Applications|Utilities).

    DOS

    UNIX

    Change directory
    Change to parent directory

    cd or chdir
    cd ..

    cd
    cd ..

    Change file protection

    attrib

    chmod

    Clear screen

    cls

    clear

    Compare files

    comp

    diff

    Copy file or directory

    copy

    cp

    create direcotry

    mkdir or md

    mkdir

    Date

    date, time

    date

    Delete directory

    rmdir or rd

    rmdir

    Delete file

    erase or del

    rm

    Display file contents

    type or type <filename> | more

    more

    Display free diskspace

    chkdsk

    df

    Find string in file

    find

    grep or fgrep

    Help

    help

    man or apropos

    List directory content

    dir

    ls or ls -l

    Print file

    print

    lpr

    Rename file

    rename or ren

    mv

    Starting Windows

    win