Recomended Unix Readings . Network . Web and Java Technologies . Instructor: Jeff.Zhuk@JavaSchool.com

Get Knoppix - CD-based UNIX . Download UNIX Emulator for Windows

How to work with the emulator: 1) Unzip it in the C:\ drive and fix PATH in your Environment Variables:
Control Panel - System - Advanced - Environment Variables - Path - Edit - Settings
Add to the end of path: ";c:\usr\local\bin" You are ready now to use some (not all!) of UNIX commands in the MS DOS shell.

Unix User Commands

For those of you who has Telnet access to UNIX server ... We hope you find helpful the list of basic UNIX commands below. Each command is followed by an example of its usage. We also give an analog of such a command in MS DOS (if exists). ---------------------------------------------------------------- ls(1) User Commands ls(1) MS DOS: DIR NAME ls - list contents of directory DESCRIPTION For each directory argument, ls lists the contents of the directory; for each file argument, ls repeats its name and any other information requested. The output is sorted alphabetically by default. When no argument is given, the current directory is listed. When several arguments are given, the arguments are first sorted appropriately, but file arguments appear before directories and their contents. Example: [sp5-20]% ls EwsBaseWin.class UtImageCanvas.java UtWin.class EwsBaseWin.java UtInfoNetDialog.class UtWin.java* [sp5-20]% ls -l total 194 -rw-r--r-- 1 jzhuk crdba 1796 May 9 11:53 EwsBaseWin.class -rw-r--r-- 1 jzhuk crdba 3061 May 9 11:53 EwsBaseWin.java -rw-r--r-- 1 jzhuk crdba 645 May 9 11:53 EwsStartWin.class -rw-r--r-- 1 jzhuk crdba 1715 May 9 11:53 EwsStartWin.java -rw-rw-rw- 1 jzhuk crdba 5111 May 9 11:53 MatrixStub.class ..... ====================================================================== grep(1) User Commands grep(1) MS DOS: nothing NAME grep - search a file for a pattern DESCRIPTION grep searches files for a pattern and prints all lines that contain that pattern. grep uses limited regular expressions (expressions that have string values that use a subset of the possible alphanumeric and special characters) like those used with ed(1) to match the patterns. It uses a compact non-deterministic algorithm. EXAMPLE: [sp5-20]% grep href= *.html client.html:href=secweb.html ========================================= chmod(1) User Commands chmod(1) MS DOS: nothing NAME chmod - change the permissions mode of a file DESCRIPTION chmod changes or assigns the mode of a file. The mode of a file specifies its permissions and other attributes. The mode may be absolute or symbolic. EXAMPLE: [sp5-20]% ls -l *.html -rw-r--r-- 1 jzhuk crdev 1702 Apr 24 10:50 client.html -rw-r--r-- 1 jzhuk crdev 3335 Apr 26 17:17 secweb.html -rw-r--r-- 1 jzhuk crdev 7001 Mar 29 12:25 webtech.html [sp5-20]% chmod 766 client.html [sp5-20]% ls -l *.html -rwxrw-rw- 1 jzhuk crdev 1702 Apr 24 10:50 client.html* -rw-r--r-- 1 jzhuk crdev 2628 Apr 24 10:54 passobj.html -rw-r--r-- 1 jzhuk crdev 1495 Apr 24 10:33 remote.html -rw-r--r-- 1 jzhuk crdev 3335 Apr 26 17:17 secweb.html -rw-r--r-- 1 jzhuk crdev 7001 Mar 29 12:25 webtech.html ========================================================== pwd(1) User Commands pwd(1) MS DOS: nothing NAME pwd - print working directory DESCRIPTION pwd prints the path name of the working (current) directory. EXAMPLE: [sp5-20]% pwd /home/user4/jzhuk/tools/ip/web ------------------------------------------------ cp copy MS DOS: copy EXAMPLE: cp /home/jzhuk/my.html ~/public_html It copies file my.html from /home/jzhuk - directory to your $HOME/public_html cp -r /home/student/java ~/. It copies all the directory "java" from /home/student/ to your $HOME ################################################################# NAME rm, rmdir - remove files, remove directories MS DOS: DEL, RD SYNOPSIS rm [-f] [-i] filename... rm -r [-f] [-i] dirname...[filename...] rmdir [-p] [-s] dirname... EXAMPLE: rm -r ip ################################### NAME who - who is on the system MS DOS: nothing [:/home/user4/jzhuk/uop/pl]who am i jzhuk pts/41 Feb 12 09:54 (sp5-20) ####################################### NAME ps - report process status MS DOS: nothing EXAMPLE: [:/home/user4/jzhuk/uop/pl]ps PID TTY TIME COMD 21604 pts/41 0:00 sh 21592 pts/41 0:00 connect 24275 pts/41 0:00 ps 16266 pts/41 0:04 ksh 21605 pts/41 0:22 netscape ############################################### NAME man - find and display reference manual pages MS DOS: nothing DESCRIPTION man displays information from the reference manuals. It displays complete manual pages that you select by title, or one-line summaries selected either by keyword (- k), or by the name of an associated file (-f). A section, when given, applies to the titles that follow it on the command line (up to the next section, if any). man looks in the indicated section of the manual (or in all sec- tions, if none is specified) for those titles; see Search Paths below for an explanation of how man conducts its search. If no manual page is located, man prints an error message. The reference page sources are typically located in the /usr/share/man/man* or /usr/man/man* directories, with each directory corresponding to a section of the manual. EXAMPLE: man pine ################################################## NAME: pine MS DOS: nothing DESCRIPTION mail system supported by help messages at the bottom of the screen EXAMPLE: pine ################################################### NAME pico MS DOS: EDIT DESCRIPTION editor supported by help messages at the bottom of the screen EXAMPLE: pico my.txt


Internet and Web Technologies