680 likes | 739 Views
UNIX, HTML, and the Indexing Assignment. donna Bair-Mundy. Unix operating system. %. ls. myfile.txt yourfile.txt %. Operating System with a Command-line interface. Pico—Use to create HTML files for Web pages. UHUNIX file structure. Root directory. bin subdirectory. home
E N D
UNIX, HTML, and the Indexing Assignment donna Bair-Mundy
Unix operating system % ls myfile.txt yourfile.txt % Operating System with a Command-line interface Pico—Use to create HTML files for Web pages
UHUNIX file structure Root directory bin subdirectory home subdirectory usr subdirectory 1 subdirectory 18 subdirectory 24 subdirectory donnab Home directory johnd Home directory nahl Home directory
Basic UHUNIX commands pwdprint working directory tells you where you are in the file hierarchy lslist lists files and subdirectories cdchange directory Moves you up or down in the file hierarchy chmodchange mode Assigns access rights to files and directories
More UHUNIX commands manmanual man + command provides access to electronic help files cpcopy cp sourcefile destinationfile copies the source file to a file with the destination file name rmremove file Deletes a file mkdirmake directory Creates a new directory
Where am I: pwd(print working directory) % pwd /home/18/donnab %
What files and directories do I have: ls (list files) % ls aardvark.txt mail myfile.txt public_html whatsup.doc %
The "all files" option: ls -a % ls -a . .. .addressbook .cshrc .inbox .login .logout .pinerc .signature .ssh2 aardvark.txt mail myfile.txt public_html whatsup.doc %
The "long' option: ls -l % ls -l -rw------- 1 donnab 47616 May 8 11:59 aardvark.txt drwx------ 2 donnab 3584 Apr 10 2002 mail -rw------- 1 donnab 45927 May 8 11:59 myfile.txt drwxr-xr-x 5 donnab 1024 Mar 20 13:51 public_html % ls -la
Changing my working directory: cd (change directory) cd change directory % cd public_html % pwd /home/18/donnab/public_html % cd fun/images % pwd /home/18/donnab/public_html/fun/images %
Changing my working directory: cd cd change directory % cd public_html donnab public_html mail fun images html files
Changing my working directory: cd cd change directory % cd fun/images donnab public_html mail fun images html files
Changing to a higher-level subdirectory: cd .. /home/18/donnab/public_html/fun/images % cd .. % Note space preceding dots pwd /home/18/donnab/public_html/fun/ % cd .. % pwd /home/18/donnab/public_html/ % cd /bin
Changing my working directory: cd cd change directory % cd .. donnab public_html mail fun images html files
Changing access rights to a file or directory: chmod(change mode, part 1) % ls -l -rwx------ 1 donnab 47616 May 8 11:59 myfile.txt drwxr-xr-x 5 donnab 1024 Mar 20 13:51 public_html % - r w x - - - - - - owner group public
Changing access rights to a file or directory: chmod(change mode, part 2) % ls -l -rwx------ 1 donnab 47616 May 8 11:59 myfile.txt drwxr-xr-x 5 donnab 1024 Mar 20 13:51 public_html % chmod 755 myfile.txt % ls -l -rwxr-xr-x 1 donnab 47616 May 8 11:59 myfile.txt drwxr-xr-x 5 donnab 1024 Mar 20 13:51 public_html r w x r - x r - x owner group public
Getting help: man command % man chmod User Commands chmod(1) 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. …
Getting help: man -k % man -k mode | more access access (3f) - return access mode (r,w,x) or existence of a file cggglm cggglm (3p) - solve a general Gauss-Markov linear model (GLM) problem chmod chmod (3f) - change mode of a file dggglm dggglm (3p) - solve a general Gauss-Markov linear model (GLM) problem f77_ieee_environment f77_ieee_environment (3f) - mode, status, and signal handling for IEEE arithmetic fegetprec fesetprec (3m) - control floating point rounding precision modes
Making back-ups: cp (copy) % cp myfile.txt myfilebk.txt % ls myfile.txt myfilebk.txt my_file.txt my file.txt
Deleting a file: rm (remove) % ls myfile.txt myfilebk.txt % rm myfilebk.txt y rm: remove myfilebk.txt (yes/no)? % ls myfile.txt
Creating a new subdirectory: mkdir (make directory) % mkdir images % ls -l drwx------ images -rwx------ myfile.txt % chmod 755 images
Logging out of the system: logout % logout You are now logged out from the Sun Tue Jul 8 11:20:18 HST 2003
A word about HTML HyperText Mark-up Language
Manuscript Chapter One A Mysterious Visitor It was a dark and stormy night. As was my custom on a Friday night, I was curled up in my favorite armchair reading Cataloging & Classification. All of a sudden, I heard a loud “Tap, tap, tap” on the window. Wondering what type of person would be out and about on such a stormy night, I went over, pulled aside the curtain, and peered out into the darkness.
Marked-up manuscript Chapter One A Mysterious Visitor It was a dark and stormy night. As was my custom on a Friday night, I was curled up in my favorite armchair reading Cataloging & Classification. All of a sudden, I heard a loud “Tap, tap, tap” on the window. Wondering what type of person would be out and about on such a stormy night, I went over, pulled aside the curtain, and peered out into the darkness. A fleur graphic B ¶ ital. b.f. ¶
Paste-up Chapter One A Mysterious Visitor It was a dark and stormy night. As was my custom on a Friday night, I was curled up in my favorite armchair reading Cataloging & Classification. All of a sudden, I heard a loud “Tap, tap, tap” on the window. Wondering what type of person would be out and about on such a stormy night, I went over, pulled aside the curtain, and peered out into the darkness.
ASCII (text) file Chapter One A Mysterious Visitor It was a dark and stormy night. As was my custom on a Friday night, I was curled up in my favorite armchair reading Cataloging & Classification. All of a sudden, I heard a loud “Tap, tap, tap” on the window. Wondering what type of person would be out and about on such a stormy night, I went over, pulled aside the curtain, and peered out into the darkness.
HTML tags (instructions to the browser) HTML file <HTML> <CENTER> <H1>Chapter One</H1> <H2>A Mysterious Visitor</H2> <IMG SRC=“fleur.gif”> </CENTER> <P>It was a dark and stormy night. As was my custom on a Friday night, I was curled up in my favorite armchair reading <I>Cataloging & Classification</I>. All of a sudden, I heard a loud <B>“Tap, tap, tap”</B> on the window.</P> <P>Wondering what type of person would be out and about on such a stormy night, I went over, pulled aside the curtain, and peered out into the darkness.</P> </HTML>
Web page Chapter One A Mysterious Visitor It was a dark and stormy night. As was my custom on a Friday night, I was curled up in my favorite armchair reading Cataloging & Classification. All of a sudden, I heard a loud “Tap, tap, tap” on the window. Wondering what type of person would be out and about on such a stormy night, I went over, pulled aside the curtain, and peered out into the darkness.
Coding a Web page Create an ASCII file with textual content Use HTML tags to format text and indicate where to place graphics Place file on Web server Open directory & file to public
Paired tags <TABLE> . . . </TABLE> <I> . . . </I> HTML Displays as The most important thing to remember is to <I>remain calm</I>. This is the first lesson to be learned. If you start to … The most important thing to remember is to <I>remain calm. This is the first lesson to be learned. If you start to … The most important thing to remember is to remain calm. This is the first lesson to be learned. If you start to … The most important thing to remember is to remain calm. This is the first lesson to be learned. If you start to …
Single tags <BR> <HR> HTML Displays as Hello. My name is Kimo. Hello. My name is Kimo. Hello. <BR> My name is Kimo. Hello. My name is Kimo. Hello. <HR> My name is Kimo. Hello. My name is Kimo.
HTML tags <HTML> </HTML>
Two parts of a Web page <HTML> <HEAD> </HEAD> <BODY> </BODY> </HTML>
Head of a Web page <HEAD> <TITLE> donna’s LIS 670 test file page </TITLE> </HEAD>
Head of a Web page <HEAD> <TITLE> donna’s LIS 670 test file page </TITLE> <meta name="DC.subject" lang="eng " content="Information science technology" /> </HEAD>
Meta tags – Dublin Core http://dublincore.org/
Meta tags – Dublin Core Title Subject Description Type (e.g., image) Creator Publisher http://dublincore.org/
Body of a Web page <BODY> Material that will appear in the viewing window of the browser. </BODY>
Adding a header <BODY> <H1> My Web Portal </H1> Aloha, World! </BODY>
Header levels <BODY> <H1> My Web Portal </H1> <H2> This is a level 2 header </H2> Aloha, World! </BODY>
Horizontally centering an item <BODY> <CENTER> <H1> My Web Portal </H1> </CENTER> </BODY> Not: <H1> <CENTER> My Web Portal </H1> </CENTER>
Adding a hot link Link destination To a Web page in the same directory as the source file <A HREF=“my_other_file.html”> Click here to go to my other file. </A> Clickable text
Adding a hot link <A HREF=“my_other_file.html”> Click here to go to my other file. </A>
Adding a hot link Full URL of Link destination To a Web page in a different location from the source file <A HREF=“http://www.ala.org/ala/aboutala/offices/oif/index.cfm”> Click here to go to the ALA Office of Intellectual Freedom Website. </A>
Using an image as a hot link <A HREF=“http://www.ala.org”> <IMG SRC=“http://www2.hawaii.edu/~donnab/lis670/ala.jpg”> </A> URL of image in quotes IMG tells the browser to place image here SRC (source) tells the browser that what follows is where to find the image