Date: Wed, 14 Feb 2007 11:55:12 -0600 (CST) From: Mark Jacobson To: 810-023-01-spring@uni.edu Subject: Quiz #3 on Friday in ITTC 27/28 classroom Hi 023 students, Here are some of the sunny.uni.edu commands that I demonstrated in class today. (Followed by 419 shown in base 20). Type man ls or man chmod or man more or man cp or man cd or man mv or man less to read more about the command. man is for manual, so in Unix you say man ls instead of help ls to see the help, i.e. the ------- online manual page for a certain command. mkdir web make a new directory named web cp index.html web copy index.html to the web folder 153 ls -l 154 ls -l .. <---------------- .. is parent directory 155 chmod 711 web 156 cd .. 711 is -wrx--x--x 7 = 111 157 chmod 711 web 111001001 = 711 1 = 001 158 history 159 cd web 160 ls 161 ls -l 162 ls -l .. 163 pico index.html 164 cp ../*.gif . <---------------- . is current directory .. is the parent and . is the current directory that is one of the children of that parent. -- - 164 cp ../*.gif . <----- This works in DOS or Unix/Linux -- - . and .. are very useful to know. The windows command prompt was always called the DOS prompt, when Windows ran on top of DOS. Modern windows (2000 and XP and so on) does not really have a separate DOS anymore, but it still has a Command Prompt and Batch files). 165 ls 166 cp ~/*.jpg . <---------------- copy all JPEG files to 167 ls the current directory, 168 history from the home directory. $ cd web $ pwd <=========== current working directory /export/home/jacobson/web is my web folder. $ --- --- $ ls -l total 184 -rw-r--r-- 1 jacobson faculty 3521 Feb 14 10:49 ButtonMFJ.gif -rw-r--r-- 1 jacobson faculty 6502 Feb 14 10:49 buttonRoundFeb9th.gif -rw-r--r-- 1 jacobson faculty 25225 Feb 14 10:49 gradient.gif -rw-r--r-- 1 jacobson faculty 30302 Feb 14 10:49 gradient023.gif -rw-r--r-- 1 jacobson faculty 21637 Feb 14 10:50 groundhog.jpg -rw-r--r-- 1 jacobson faculty 3530 Feb 14 10:48 index.html ******** See how they all were chmod 644 permissions ********* 644 = 110100100 rw-r--r-- ooogggeee o = owner of the file g = group permissions for group owner's account (user id) is part of e = everyone else, other, the internet o = 6 = 110 = rw- owner g = 4 = 100 = r-- group e = 4 = 100 = r-- other (everyone else) $ cd .. $ pwd <---- present working directory /export/home/jacobson ---------------------------------------------------------------------------- man pwd NAME pwd - return working directory name SYNOPSIS /usr/bin/pwd DESCRIPTION pwd writes an absolute path name of the current working directory to standard output. ---------------------------------------------------------------------------- What would 419 look like in base 20? Base 20 digits would be 0, 1, ..., 9, A, B, C, D, E, F, G, H, I, J 0, 1, ..., 9,10,11,12,13,14,15,16,17,18,19 2 2 1 0 Since 20 = 400, we would have 1 x 20 + 0 x 20 + J x 20 1 x 400 + 0 x 20 + J x 1 = 10J 20 So 10J is the base 20 representation of base ten 419. 10J = 419 20 10 In base 16 (hexadecimal) A, B, C, D, E, F are the extra 6 digits needed. In base 20 we need 4 more digits, so we just use G, H, I and J. Can you dig it? :-) Mark