Transcript Unix, Linux, DOS, Windows Command Line
Unix, Linux, DOS, Windows Command Line CSE 660 May 12, 2008
Command Languages / Shells
• • • Unix / Linux – bash – Many other shells DOS / Windows – .bat – Cygwin ( http://www.cygwin.com
) – Linux-like environment for Windows making it possible to port software running on POSIX systems (such as Linux, BSD, and Unix systems) to Windows.
POSIX – IEEE name for Unix standard
stdin, stdout, pipes, filters
• • • • pass output to something else > take input from file < pipe output from one program to another | little programs that act like filters – break source text file into words – sort that file of words – compare against file of correctly spelled words – print non-matching original words (misspelled)
pipes
• ls –l | less • Garbage < in.dat > out.dat
Unix man
• • • One of the innovations of Unix Online manuals are available on all the commands by typing "man command_name".
To find out how to do something on UNIX simply type "man -k subject_matter". This will do a key word search for all commands dealing with the subject matter. Then use the appropriate command.
DOS .bat vs. bash
• •
UNIX Unleashed, System Administrator's
Edition, Chap 13: Which Shell Is Right for You? Shell Comparison ( http://docs.rinet.ru/UNIXs/ch13.htm
) UNIX For DOS Users ( http://www.yolinux.com/TUTORIALS/unix_for _dos_users.html
)
DOS vs bash
• • • • • • • • DOS DIR TREE CD MD RD COPY XCOPY UNIX / bash Action ls List directory contents ls -R cd List directory recursively Change directory mkdir rmdir cp -piv cp –R Make a new directory Remove a directory Copy a file Copy all files of directory recursively
For the DOS user who forgets
• • • • • • • • alias dir="echo 'Use the command: ls -lF'" alias tree="echo 'Use the command: ls -R'" alias del="echo 'Use the command: rm -iv'" alias move="echo 'Use the command: mv -iv'" alias rename="echo 'Use the command: mv -iv'" alias copy="echo 'Use the command: cp -piv'" alias type="echo 'Use the command: cat'" alias cls="echo 'Use the command: clear’”