Comparison of Various Commands



TO: DOS Commands UNIX Command Windows Procedures
see contents of a folder or directory DIR l Right-click Start button, click Explore then left click directory or folder
list folder or directory contents a page at a time DIR/P l l|more Right-click Start button, click Explore then left click a directory or folder

(use page up/down keys to view pages)

format (prepare) a floppy disk FORMAT A:

(where "A" is drive to be formatted)

dosformat a: Double-click My Computer icon then right click drive with the floppy; choose Format from drop down menu
see file contents TYPE "filename" more "filename" open file with notepad or appropriate program
copy a file COPY A:\"filename"

C:\"filename"

source to destination

cp "filename" "folder"/"filename" right-click Start button, then right-click file to be copied; choose Copy from drop down menu (use paste or drag and drop to destination)
move a file MV A:\"filename" C:\"filename"

(source to destination)

mv "filename" "folder"/"filename" right-click file to be moved without releasing button; drag and drop file to destination file, folder or drive.
erase or delete files DEL "filename" rm "filename" right-click Start button, click Explore then right-click file to be copied; choose Delete from drop down menu
erase or delete empty folders RD "foldername" rmdir

"folder/foldername"

right-click Start button, then right-click folder to be deleted; choose Delete from drop down menu
view time/date DATE date double-click time in lower right corner on task bar
print file PRN "include appropriate strings and switches" lpr "filename"or

prnf PC "filename"

On menu bar, click File and select Print from the drop-down menu; or use print button on tool bar
find help EDIT then choose Help from menu bar man "command" click Help on menu bar, or click Start, and help from pop-up menu
change working directory CD.. (moves back one directory)

or CD\ (moves to root directory)

cd .. right-click Start button, click Explore, use Up button on toolbar or click Go and choose 'Up one level'
organize or alphabetize file or directory contents "filename" |SORT

or

"foldername"|SORT (for a directory list)

sort "filename"

or

l |sort (for a directory list)

Right-click Start button, then right-click directory or file(s). On Menu bar choose View and click appropriate view options
make or create a directory MKDIR "foldername" or MD "foldername" mkdir "foldername" right-click Start button, click Explore then right-click in folder, click New, and choose Folder from drop down menu
change prompt PROMPT "characters or strings desired"
make a file/folder read only "filename" +r

(or -r to change to read/write)

chmode -R "filename"

("+" adds or "-" removes permission)

right-click Start button, click Explore then right-click file/folder, click Properties, and check appropriate box.
rename a file REN "oldfilename" "newfilename" mv "oldfilename" "newfilename" right-click Start button, click Explore then right-click file/folder, click Rename.
sort files alphabetically DIR |SORT l |sort right-click Start button, click Explore, click View on menu bar. Select Arrange Icons and choose by Name option.
redirect or send input/output to another place or device "command/filename"

< or >

"destination folder/file or device"

ex: DIR > PRN

(prints a copy of directory)

"command/filename

< or >

"filename"

ex: more < cob0.cob

(more command collects file info and displays line by line)

specify a path where program resides PATH "path"

ex: PATHC:\12\23.exe

show visual layout of folder(s) and contents TREE

Final project for Computer 111

created by David Cooper

March 13, 2000

Instructor: Olga Stride