Magazine article Computers in Libraries

Web Page UNIX for Beginners

Magazine article Computers in Libraries

Web Page UNIX for Beginners

Article excerpt

You've finished organizing and writing the content of your first Web page. You've labored over the HTML tags. And you've uploaded the document to your Web server. All set to go? Not quite. You might need to know a little UNIX to get the page up and running. If you have to put a page up by yourself, you'll want to learn just enough to help you complete your project.

UNIX? Some people cringe at the thought of learning another set of commands and instructions to get their Web page going. Others look down their noses at the operating system that many say is "user unfriendly." Still others may shrug their shoulders and ask, "What's UNIX?"

UNIX is the operating system of choice for many of the computers on the Internet that function as Web servers. It was developed in the early 1970s, when the Internet was in its infancy, in large part to serve as the underlying software technology for what has become known as client/server architecture. UNIX was developed along with TCP/IP protocols and has been a strong contributor to what the World Wide Web can do. Conventions such as remote and anonymous login, world-readable files, and multi-user access have very much been a part of UNIX from its earliest days. UNIX was originally developed as a kind of "shareware" but is now sold as a product by several companies. There are slight differences between these various products, but for the most part they act the same.

If you are loading your Web page on a UNIX server, it is likely that you'll have to learn a few of the basic commands to set up the page. You may have to ensure that it is in the right directory, that the files are named correctly, and that file permissions are set to allow proper access. Let's walk through a typical scenario to look closely at the points where you may need to know a little UNIX.

List Files

Let's say that you have your document or file uploaded to the machine on which you have access to an account for your Web page. One thing you will want to do is make sure that the file is in the right directory. For this you will probably need to list the files in a directory, possibly change directories, or at least make sure you are in the right directory.

The first command you are likely to use is the "list" command. This is basically the equivalent to the "dir" command in DOS and allows you to list all files in the current directory. When you type and enter "Is," UNIX shows you a short description "name only" of most files and directories:

unix% ls unix WWW seo.html

The "Is" command gives only minimal information about these two items. But if you type "Is" followed by "-la," you'll see a longer description of files. For instance:

unixt ls -la

unix% -rw---- 1 techman lib 2882 Aug 27 13:59 .login

drwxr-x-- 2 techman lib 512 May 22 12:21 WWW

-rw-r-r- 1 techman lib 2003 May 19 10:01 seo.html

The "Is" command with the "-la" option shows more information and includes an additional item. Usually, a file with a "dot" before the name is a system file that is hidden from normal view. The letter "a" in the "-la" option tells UNIX to show all files.

The "l" in the "-la" option tells UNIX to list files and directories in the long form, which includes (from left to right) the file permission settings, the number of links to the item, the owner, the group, the size of the file, the date it was created, and the name of the file or directory. One of the most important things to understand about UNIX files is the file permission settings.

Note in the example above that the file permissions for .login and seo.html start with a "dash," whereas WWW starts with the letter "d." This indicates that WWW is a directory and the other two items are files. (Why, you might ask, didn't they use the letter "f" instead of a dash? My answer: Beats me!) You have to look closely to distinguish between files and directories, although some people write directory names with a capital letter so they stand out (and when sorted, names with capitals are sorted before those starting with lower case). …

Search by... Author
Show... All Results Primary Sources Peer-reviewed


An unknown error has occurred. Please click the button below to reload the page. If the problem persists, please try again in a little while.