Content Lists

Written by Pantas Manik on 11:44 AM

Job Career Vacancy.
Available on Indonesia
1.Job Vacancy For Project Scheduler
Posted: 16 Feb 2008 10:44 PM CST
You can also visit here for more Job Vacancies!
Help Related to Windows.

  • How Long has Your System been Running?

  • 10 Fast and Free Security Enchancements

  • 23 Ways to Speedup Your WindowsXP

  • How to Access Your Folders from Your Taskbar

  • How to Create Personnal Screensaver on WindowsXP

  • What is DirectX

  • Getting Older Program to Run on WindowsXP

  • How do I Remove an Extra Operating System

  • Create One Click SHUTDOWN and REBOOT shortcut

  • How To Change Your Ip In Less Then 1 Minute
  • For Real Windows Newbie's Shortcuts

  • Mastering The Windows XP Registry

  • Lots Of Windows Xp Tips, Take A Look !

  • Keyboard Shortcuts in Microsoft Excel

  • Command Shortcuts and Keyboard Shortcuts

  • Keyboard Shortcuts on Microsoft Word


  • General Help
  • 10 Reason why Your PC Crash

  • 250 Technical Support Book Online

  • A Basic Guide to Internet

  • All MIRC Commands

  • A Web Standards Checklist & How to Make a Proper Website

  • Computer Acronyms

  • Recover Corrupted System File

  • PC Maintenance Guide

  • Overclocking

  • No Text Icon

  • New PC or New Motherboard

  • List of Sites not to go to

  • Linking Your XBOX to Your Computer

  • How to Speedup a Slow Computer

  • How to Safeguard Your Files When Crashes - LINUX


  • Help Related to UNIX and LINUX
  • Unix Commands for Beginner

  • UNIX for Beginner

  • How LINUX Boots


  • Unix Commands for Beginner

    Written by Pantas Manik on 12:28 PM

    Contents
    cat--- for creating and displaying short files
    chmod --- change permissions
    cd --- change directory
    cp --- for copying files
    date --- display date
    echo --- echo argument
    ftp --- connect to a remote machine to download or upload files
    grep --- search file
    head --- display first part of file
    ls --- see what files you have
    lpr --- standard print command (see also print )
    more --- use to read files
    mkdir --- create directory
    mv --- for moving and renaming files
    ncftp --- especially good for downloading files via anonymous ftp.
    • print --- custom print command (see also lpr )
    • pwd --- find out what directory you are in
    • rm --- remove a file
    • rmdir --- remove directory
    • rsh --- remote shell
    • setenv --- set an environment variable
    • sort --- sort file
    • tail --- display last part of file
    • tar --- create an archive, add or extract files
    • telnet --- log in to another machine
    • wc --- count characters, words, lines

    "lpr"

    Written by Pantas Manik on 2:24 PM

    This is the standard Unix command for printing a file. It stands for the ancient "line printer." See:
    % man lpr

    "ls"

    Written by Pantas Manik on 2:15 PM

    This command used to see what files you have. Your files are kept in something called a directory.
    % ls
    test test1
    test2 test3
    pantas pantas2
    %
    Note that you have six files. There are some useful variants of the ls command:
    % ls t*
    test test1 test2 test3
    %
    Note what happened: all the files whose name begins with "l" are listed. The asterisk (*) is the "wildcard" character. It matches any string.

    "head"

    Written by Pantas Manik on 2:11 PM

    This command used to look at the head of a file. For example,
    % head essay.001
    displays the first 10 lines of the file essay.001 To see a specific number of lines, do this:
    % head -20 essay.001
    This displays the first 20 lines of the file.

    "grep"

    Written by Pantas Manik on 2:04 PM

    This command used to search for information in a file or files. For example, suppose that we have a file named "test" whose contents are
    test1 test2
    test3 test4
    test5 test6
    test7 test8
    test9 test10


    Then we can look up items in our file like this;
    % grep test1 test
    test1 test2
    % grep test3 test
    test3 test4
    % grep test8 test
    test7 test8

    For more detail "grep" command you can use:
    % man grep

    "ftp"

    Written by Pantas Manik on 1:56 PM

    This command used to connect to a remote machine, then upload or download files.
    example:

    % ftp 172.25.75.51
    220 SH14 FTP server (Version wu-2.4(11) Mon Jan 11 17:26:33 MDT 2008) ready.
    Name (solitude:urasima): pantas
    331 Password required for pantas.
    Password:
    230 User pantas logged in.

    For more details "ftp" please type:
    % man ftp

    "echo"

    Written by Pantas Manik on 1:36 PM

    This command used to preview the argument, please see the example
    % echo this
    this
    % echo $EDITOR
    /usr/local/bin/emacs
    % echo $PRINTER
    b129lab1

    "ncftp "

    Written by Pantas Manik on 2:46 PM

    "ncftp", used for remoting another PC same like "ftp" command but ncftp used for anonymous user.

    example% ncftp 172.25.74.51
    220 SH14 FTP server (Version wu-2.4(11) Mon Jan 11 17:26:33 MDT 2008) ready.
    Name (solitude:test): Anonymous
    230 User Anonymous logged in.

    Now you're login as Anonymous user. For more details about "ncftp " command you can used %man ncftp

    "mv"

    Written by Pantas Manik on 2:44 PM

    This command used change the name of file and directories.
    % mv test testhead
    The file that was named test is now named testhead

    "date"

    Written by Pantas Manik on 1:31 PM

    This command used to check the date and time.
    % date
    sat Jan 4 08:52:42 MST 2008

    "cp"

    Written by Pantas Manik on 1:27 PM

    This command used to copy files or directories.
    % cp test test.2
    This makes a copy of the file test.
    % cp ~/pantas/manik .
    This copies the file manik in the directory pantas to the current directory. The symbol "." stands for the current directory. The symbol "~" stands for the home directory.

    "cd"

    Written by Pantas Manik on 12:54 PM

    Use cd to change directory. Use pwd to see what directory you are in.
    % cd pantas
    % pwd
    % /u/ma/pantas/manik
    % ls
    testhead1 testhead2
    % cd test
    % pwd
    % /u/ma/pantas/manik/test
    % ls
    test test1 test2 test3 test4
    % cd ..
    % pwd
    % /u/ma/pantas/manik

    "more"

    Written by Pantas Manik on 2:41 PM

    More is a command used to read text files. For example, we could do this:
    % more text>
    The effect of this to let you read the file "text ". It probably will not fit in one screen, so you need to know how to "turn pages". Here are the basic commands:
    • q --- quit more
    • spacebar --- read next page
    • return key --- read next line
    • b --- go back one page

    For more details about this command use can used man more

    "chmod"

    Written by Pantas Manik on 12:42 PM

    This command is used to change the permissions of a file or directory.
    For example to make a file "testplan" readable by everyone, we do this:
    % chmod a+r testplan
    To make a file "testplan" to be executable, we do this :
    % chmod +x mycommand
    Now we can run mycommand as a command. To check the permissions of a file use ls -

    For more details "chmod" command please type "man chmod"

    "mkdir"

    Written by Pantas Manik on 2:28 PM

    This command used to create a directory.
    % mkdir [ directory name ]
    example:
    % mkdir testhead
    To ensure that we have made it succesfully, just type below command to see the directory
    % ls
    testhead urasima pantas

    For details about this command please type like below command:
    %man mkdir

    "cat"

    Written by Pantas Manik on 12:38 PM

    This is one of the most flexible Unix commands. We can use to create, view and concatenate files. For our first example we create a three-item English-Spanish dictionary in a file called "dict."
    % cat >dict
    red rojo
    green verde
    blue azul

    %
    stands for "hold the control key down, then tap 'd'". The symbol > tells the computer that what is typed is to be put into the file dict. To view a file we use cat in a different way:
    % cat dict
    red rojo
    green verde
    blue azul
    %
    If we wish to add text to an existing file we do this:
    % cat >>dict
    white blanco
    black negro

    %
    Now suppose that we have another file tmp that looks like this:
    % cat tmp
    cat gato
    dog perro
    %
    Then we can join dict and tmp like this:
    % cat dict tmp >dict2
    We could check the number of lines in the new file like this:
    % wc -l dict2
    8
    The command wc counts things --- the number of characters, words, and line in a file.

    Part 14. The Unix File System

    Written by Pantas Manik on 3:32 PM

    Most Unix machines store their files on magnetic disk drives. A disk drive is a device that can store information by making electrical imprints on a magnetic surface. One or more heads skim close to the spinning magnetic plate, and can detect, or change, the magnetic state of a given spot on the disk. The drives use disk controllers to position the head at the correct place at the correct time to read from, or write to, the magnetic surface of the plate. It is often possible to partition a single disk drive into more than one logical storage area. This section describes how the Unix operating system deals with a raw storage device like a disk drive, and how it manages to make organized use of the space.

    How the Unix file system works

    Every item in a Unix file system can be defined as belonging to one of four possible types.

    Ordinary files

    Ordinary files can contain text, data, or program information. An ordinary file cannot contain another file, or directory. An ordinary file can be thought of as a one-dimensional array of bytes.

    Directories

    In a previous section, we described directories as containers that can hold files, and other directories. A directory is actually implemented as a file that has one line for each item contained within the directory. Each line in a directory file contains only the name of the item, and a numerical reference to the location of the item. The reference is called an i-number, and is an index to a table known as the i-list. The i-list is a complete list of all the storage space available to the file system.

    Special files

    Special files represent input/output (i/o) devices, like a tty (terminal), a disk drive, or a printer. Because Unix treats such devices as files, a degree of compatibility can be achieved between device i/o, and ordinary file i/o, allowing for the more efficient use of software. Special files
    can be either character special files, that deal with streams of characters, or block special files, that operate on larger blocks of data. Typical block sizes are 512 bytes, 1024 bytes, and 2048 bytes.

    Links

    A link is a pointer to another file. Remember that a directory is nothing more than a list of the names and i-numbers of files. A directory entry can be a hard link, in which the i-number points directly to another file. A hard link to a file is indistinguishable from the file itself. When a hard link is made, then the i-numbers of two different directory file entries point to the same inode. For that reason, hard links cannot span across file systems. A soft link (or symbolic link) provides an indirect pointer to a file. A soft link is implemented as a directory
    file entry containing a pathname. Soft links are distinguishable from files, and can span across file systems. Not all versions of Unix support soft links.

    The I-List

    When we speak of a Unix file system, we are actually referring to an area of physical memory represented by a single i-list. A Unix machine may be connected to several file systems, each with its own i-list. One of those i-lists points to a special storage area, known as the root file system. The root file system contains the files for the operating system itself, and must be available at all times. Other
    file systems are removable. Removable file systems can be attached, or mounted, to the root file system. Typically, an empty directory is created on the root file system as a mount point, and a removable file system is attached there. When you issue a cd command to access the files and directories of a mounted removable file system, your file operations will be controlled through the i-list of the removable file system.

    The purpose of the i-list is to provide the operating system with a map into the memory of some physical storage device. The map is continually being revised, as the files are created and removed, and as they shrink and grow in size. Thus, the mechanism of mapping must be very flexible to accommodate drastic changes in the number and size of files. The i-list is stored in a known location,
    on the same memory storage device that it maps.

    Each entry in an i-list is called an i-node. An i-node is a complex structure that provides the necessary flexibility to track the changing file system. The i-nodes contain the information necessary to get information from the storage device, which typically communicates in fixed-size disk blocks. An i-node contains 10 direct pointers, which point to disk blocks on the storage device. In addition,
    each i-node also contains one indirect pointer, one double indirect pointer, and one triple indirect pointer. The indirect pointer points to a block of direct pointers. The double indirect pointer points to a block of indirect pointers, and the triple indirect pointer points to a block of double indirect pointers. By structuring the pointers in a geometric fashion, a single i-node can represent a very large
    file.

    It now makes a little more sense to view a Unix directory as a list of i-numbers, each i-number referencing a specific i-node on a specific i-list. The operating system traces its way through a file path by following the i-nodes until it reaches the direct pointers that contain the actual location of the file on the storage device.

    The file system table

    Each file system that is mounted on a Unix machine is accessed through its own block special file. The information on each of the block special files is kept in a system database called the file system table, and is usually located in /etc/fstab. It includes information about the name of the device, the directory name under which it will be mounted, and the read and write privileges for the device. It is possible to mount a file system as "read-only," to prevent users from changing anything.

    File system quotas

    Although not originally part of the Unix filesystem, quotas quickly became a widely-used tool. Quotas allow the system administrator to place limits on the amount of space the users can allocate. Quotas usually place restrictions on the amount of space, and the number of files, that a user can take. The limit can be a soft limit, where only a warning is generated, or a hard limit, where no further operations that create files will be allowed.

    The command quota

    will let you know if you're over your soft limit. Adding the -v option will provide statistics about your disk usage.

    File system related commands

    Here are some commands related to file system usage, and other topics discussed in this section:
    bdf

    On HP-UX systems, reports file system usage statistics

    df
    On HP-UX systems, reports on free disk blocks, and i-nodes

    du

    Summarizes disk usage in a specified directory hierarchy

    ln

    Creates a hard link (default), or a soft link (with -s option)

    mount, umount

    Attaches, or detaches, a file system (super user only)

    mkfs

    Constructs a new file system (super user only)

    fsck

    Evaluates the integrity of a file system (super user only)

    A brief tour of the Unix filesystem

    The actual locations and names of certain system configuration files will differ under different implementations of Unix. Here are some examples of important files and directories under version 9 of the HP-UX operating system:

    /hp-ux
    The kernel program

    /dev/

    Where special files are kept

    /bin/
    Executable system utilities, like sh, cp, rm

    /etc/
    System configuration files and databases

    /lib/
    Operating system and programming libraries

    /tmp/
    System scratch files (all users can write here)

    /lost+found/
    Where the file system checker puts detached files

    /usr/bin/
    Additional user commands

    /usr/include/
    Standard system header files

    /usr/lib/
    More programming and system call libraries

    /usr/local/
    Typically a place where local utilities go

    /usr/man
    The manual pages are kept here

    Other places to look for useful stuff

    If you get an account on an unfamiliar Unix system, take a tour of the directories listed above, and familiarize yourself with their contents. Another way to find out what is available is to look at the contents of your PATH environment variable:

    echo $PATH



    You can use the ls command to list the contents of each directory in your path, and the man command to get help on unfamiliar utilities. A good systems administrator will ensure that manual pages are provided for the utilities installed on the system.

    Part 13. Interactive Use of the Shell

    Written by Pantas Manik on 3:24 PM

    This section discusses tips and tricks to make your use of the shell more efficient.

    File name completion

    Both ksh and csh will perform file name completion for you. You can type in a partial file name, and press the ESCAPE key (once for csh, twice for ksh). The shell will then complete the name of the file for you. If no file exists that begins with the characters you typed, the shell will beep at you, and will not complete the name. If more than one file begins with the characters you typed, the shell will
    complete the name up to the point where the names differ. Then you can type additional letters to specify the file name you want, reusing the ESCAPE key if desired.

    Command name aliasing

    Both csh and ksh provide command name aliasing, to allow you to rename commands. Aliasing can save a lot of keystrokes if you must frequently issue the same lengthy command. The alias command requires two pieces of information: The command you wish to alias, and the alias you wish to use to refer to it.

    EXAMPLE: To alias the "history" command to "hi" you could use the following command in the Korn shell:

    alias hi='history'

    After entering that alias, you could type the command "hi" and the shell would substitute "hi" with the string "history" before executing it. The same command could be accomplished in the C shell with the syntax:

    alias hi history

    EXERCISE: Create an alias in the Korn shell called "clean" that would remove any files from your home directory that have the extension .gif or .jpg.

    EXPLANATION: The command:

    alias clean='rm ~/*.gif; rm ~/*.jpg'

    would work.

    Command aliasing can be tricky. Surround the alias string with single quotes (') to prevent the shell from interpreting special characters. If you use command history substitution in an alias, use the backslash character (\) to escape characters that you don't want the shell to interpret.

    EXAMPLE: This example, written for the C shell, creates an alias for the cd command, so that it stores the current location in a shell variable called old before it changes to the new location. It also creates a new command alias called back that allows us to go back to the previous location:

    alias cd 'set old=$cwd; chdir \!*; pwd'

    alias back 'set foo=$old; cd $foo; unset foo'

    There are several things to note in the above example. The alias for cd has three parts: The first reads the current working directory from the shell variable cwd, and saves it in a shell variable called old.
    The second part uses history substitution and chdir to change the current location. The use of chdir prevents an "aliasing loop," where the cd command calls itself. The third part executes the pwd command to print the new location on the screen.

    The alias for back also has three parts: The first part reads the previous location from the shell variable old, and stores it in a shell variable called foo. That is necessary because the new cd alias will change the value of old when we call it in the second part of the back alias. The third part cleans up our mess by unsetting the variable foo, removing it from the environment.

    You can remove an alias using the unalias command. To remove the "clean" alias you created in a previous exercise, enter the command:

    unalias clean

    Command history substitution

    The C shell and Korn shell will keep an ordered list of the commands you have issued, and allow you to retrieve commands from the list. That facility, called command history substitution, makes it possible to reuse all or part of your previously issued commands. Each command on the list is given a command number, according to the order it was issued. You can view the command history list by
    issuing the command:

    history

    The exact mechanism of retrieving commands from the command history list depends on the shell you're using, and how you have customized your shell.

    ksh

    When using the Korn shell, the number of commands remembered by the shell is controlled by the HISTSIZE environment variable. Use the command:

    HISTSIZE=50;export HISTSIZE

    to set the length of the history list to fifty. By default, the history size is set to 128 lines.

    The shell command "set -o" is used to specify the editing mode for the command line, either emacs or vi. Since an earlier section of this workshop dealt with emacs, we will confine our discussion to the emacs editing style. To use the emacs editing mode, enter the command:

    set -o emacs

    In emacs editing mode, recall previous commands with the emacs command for "previous line," or Control-P. Repeated use of Control-P will recall earlier commands. You can also use the emacs command for "next line," or Control-N, to go forward through your command history, toward more recently-issued commands. You can only use Control-N after you have used Control-P at least once.

    csh

    The C shell allows you to recall previous commands in whole or in part. In the C shell, the history shell variable is used to specify the number of lines the shell will remember.

    The statement

    set history=60

    will cause the C shell to remember sixty commands.

    To recall previous commands from the history list, the C shell uses the exclamation point (!) character, sometimes referred to in computer jargon as "bang." The bang character can be used in combination with history line numbers, and text patterns.

    Here are some examples of how to use
    history substitution in the C shell:

    Recall the last command:
    !!


    Recall the third most recent command:
    !-3


    Recall command number ten from the history list:
    !10


    Recall the last command that began with the letters "ls":
    !ls


    You can also recall specific pieces of previous commands, and use them to create new commands. The colon character is used to select specific words from a command. Each word in the command is referred to by position. The command name itself is item number zero. Here are some examples:

    Recall the third word from the last command:
    !:2

    Perform an "ls" on the second word from command number 8:
    ls !8:1

    Use more to view the last item from command number ten:
    more !10:$


    Editing the command line

    The Korn shell (ksh) provides the ability to edit the command history list almost as if your were in an editor program like vi, or emacs. The current command is always the last line in the history list, and begins blank. You can type in a new command, or recall an earlier command from the list. You can also modify the text on the current line using basic text editor commands.

    The mechanism for setting the editor style in ksh is the "set -o" command. To edit in emacs mode, issue the command:

    set -o emacs

    Manipulating command line text in emacs mode is done in much the same way as text editing with emacs. When you finish editing the command line, press the return key to issue the command to the shell. You might want to go back and refresh your memory on emacs by reviewing section ten of this tutorial, titled "Text Editing with Emacs."

    Part 12. Customizing the Unix Shell

    Written by Pantas Manik on 2:55 PM

    Choosing your shell

    It is possible to invoke any available shell from within another shell. To start a new shell, you can simply type the name of the shell you want to run, ksh, csh, or sh.




    The Unix shell is a actually a user program that the kernel runs for you when you log in. There is usually more than one shell available on most Unix systems. The most common shells available on Unix systems are the Bourne Shell (sh), the C Shell (csh) and the Korn shell (ksh). Here is a summary of features available on these three shells, adapted from the Hewlett Packard "Beginner's Guide to HPUX."

    It is also possible to set the default startup shell for all your future sessions. The default shell for your account is stored in the system database /etc/passwd, along with the other information about your account. To change your default
    shell, use the chsh command The chsh command requires one argument, the name of the shell you want as your default. To change tour default shell to the C shell, you could enter the command

    chsh /bin/csh

    On ISU's HP-UX system, the available shells are /bin/sh, /bin/posix/sh, and /bin/csh. The default shell for accounts is /bin/posix/sh, which is, for all practical purposes, the same as ksh.

    Default file access permissions

    Whenever you create a file or directory in a Unix filesystem, the newly created file or directory is stamped with a default set of permissions. That default set of permissions is stored in a variable called the umask. You can change the
    value of umask to suit your preferences. To see the current value of the umask variable, enter the shell command:

    umask

    The umask is stored as an octal (base 8) number, that defines which permissions to deny. As you recall, three kinds of file permissions (read, write, and execute) are given for each of three classes of users (owner, group, and others).
    Each of the nine permissions is specified as a zero (allow access), or a one (deny access).

    To set your umask to deny write permission to group and others, use the command:

    umask 022

    To deny all access to group and others, use the command:

    umask 077

    Some versions of Unix provide a more user-friendly way of specifying your umask. In HP-UX sh-posix (or ksh), you are allowed to specify the access permissions in manner of the chmod command. The command:

    umask u=rwx,g=r,o=r

    would set the umask to deny write and execute permissions to the group, and to others. That kind of command syntax will not work in HP-UX's C shell or Bourne shell. The HP-UX posix shell also allows the use of the command:

    umask -S

    to print your umask setting in a more readable fashion.

    Customizing with user login scripts

    The remainder of this section describes some of the ways you can initialize ksh, by presenting the default user login scripts provided to users of ISU's CWIS machine. The scripts have been annotated with descriptions of the purpose of each set of commands.

    The .profile file

    #!/bin/posix/sh
    #******************************************************************************
    # Run the script .shrc in every subshell.
    #******************************************************************************
    ENV="$HOME/.shrc";export ENV
    #******************************************************************************
    # Leave a sign of last login in user's home directory
    # Remove this line if you don't want such records left.
    # All logins are logged elsewhere, anyway.
    #******************************************************************************
    touch $HOME/.lastlogin
    chmod 600 $HOME/.lastlogin
    #******************************************************************************
    # THREE TYPES OF TERMINAL-CHOOSING MECHANISMS ARE PRESENTED BELOW. ONLY
    # ONE SHOULD BE USED. AUTOMATIC DETECTION OF TERMINAL TYPE IS THE DEFAULT.
    #******************************************************************************
    #******************************************************************************
    # Uncomment the following line (i.e. remove # at the beginning of line)
    # to make it so you're prompted for terminal type at login (rather than
    # having term type hard-coded or having the system automatically detect
    # your terminal type). Replace 'vt220' with another term type if you want a
    # different default terminal type presented with the user prompt.
    #******************************************************************************
    # eval ` tset -s -Q -m ":?vt220" `
    #******************************************************************************
    # Uncomment the following line (i.e. remove # at beginning of line)
    # if you want to hard-code a terminal type.
    # Replace 'vt220' with any desired terminal type. Use this option only if
    # you are always using the same type of terminal, and if the system doesn't
    # seem to properly detect your terminal type.

    #******************************************************************************
    # TERM=vt220
    #******************************************************************************
    # If you chose either of the above terminal-choosing options, comment out
    # the following section from 'if' to 'fi' (insert a # at the beginning of
    # each line). Otherwise, the default terminal handling for terminal access
    # is to have the system attempt to detect your terminal type.
    #******************************************************************************
    if [ "${TERM}X" = "X" ]
    then
    TERM=`ttytype`
    case $TERM in
    *2382* | *2392* | *2393* | *2394* | *2397* | *2621* ) TERM="hp" ;;
    *2621* | *2622* | *2623* | *2624* | *2625* | *2626* ) TERM="hp" ;;
    *2627* | *2628* | *2640* | *2641* | *2644* | *2645* ) TERM="hp" ;;
    *2647* | *2648* | *2649* | *150* | *70092* | *70094* ) TERM="hp" ;;
    esac
    fi
    #*****************************************************************************
    # Leave this line alone: it applies for all terminal-setting options
    #*****************************************************************************
    export TERM
    #******************************************************************************
    # Set up the terminal:
    #******************************************************************************
    stty hupcl ixon ixoff ienqak -parity
    stty erase "^H" kill "^U" intr "^C" eof "^D" susp "^Z"
    tabs
    #*****************************************************************************
    # Display little menu of options
    #*****************************************************************************
    /usr/local/bin/menu

    The .shrc file

    #!/bin/posix/sh
    #*****************************************************************************
    # Set default permissions so that you can read and write all files, and that
    # others can't. Changing this can potentially mess up the security of your
    # account, so make sure you know what you're doing before changing this.
    #*****************************************************************************
    umask 077
    #******************************************************************************
    # set paths: PATH tells the shell where to look for programs/commands when
    # you type command or program names. MANPATH tells the shell where to look
    # for Unix 'man' pages. NNTPSERVER tells news readers to get Usenet news from
    # the cwis computer.
    #******************************************************************************
    PATH=$HOME/bin:.:/bin/posix:/bin:/usr/bin:/usr/contrib/bin:/usr/local/bin:/usr/bin/X11:/usr/local/bin/X11:/usr/contrib/bin/X11:/share/gen/bin:/share/X11/bin
    MANPATH=/usr/man:/usr/local/man:/usr/contrib/man:/share/gen/man:/share/X11/man
    NNTPSERVER=localhost
    #******************************************************************************
    # Set up the shell environment variables:
    # HOST and GROUPNAME get set for old cwis menus.
    # If you want an editor other than pico (like vi or emacs) to be your default
    # editor, replace pico with the name of your preferred editor.
    # HISTSIZE determines how many of your previous commands are retained for
    # recalling.
    # The line with PAGER determines the default pager to use for reading through
    # documents one page at a time.
    # The line with LESS makes it so informative keystroke prompts are put at the
    # bottom of the screen when using the less pager.
    # LPDEST determines which printer queue your print jobs submitted with the lp
    # command go to. This line is changed by the 'printers' program, so try
    # not to radically alter this line. You can manually change the queue name
    # here if you want to.
    #******************************************************************************
    export HOST=`hostname`
    export GROUPNAME=`groups -p $LOGNAME`
    EDITOR=pico;export EDITOR
    HISTSIZE=200;export HISTSIZE
    PAGER="less";export PAGER
    LESS='-c -P spacebar\:page ahead b\:page back /\:search ahead \?\:search back h\:help
    q\:quit';export LESS
    LPDEST=laser_q2;export LPDEST
    #*****************************************************************************
    # Treat unset parameters as an error when substituting.
    # Don't mess with this unless you're a guru.
    #*****************************************************************************
    set +u
    #*****************************************************************************
    # Make it so your terminal is not open to talk requests and placement of
    # comments on your screen by other users. Change this line to 'mesg y' if
    # you want to be open to talk requests by default. Otherwise, you can type
    # 'mesg y' within a session to temporarily open yourself for talk requests.
    #*****************************************************************************
    mesg n
    #*****************************************************************************
    # Set up shell for vi-style command line editing (i.e. recalling commands with
    # ESC-k, and using vi editor keystrokes to edit command lines).) If you prefer,
    # you can replace 'vi' with 'emacs' for emacs-style command line editing (i.e.

    # recalling commands with control-P, and using emacs editor keystrokes to edit
    # the command line.
    #*****************************************************************************
    set -o vi
    #*****************************************************************************
    # Define user prompt to show hostname and current directory.
    # This can be changed to anything.
    # Change it to
    #
    # PS1 = 'GET TO WORK, BOZO!! '
    #
    # if you want the command prompt to repeatedly insult you.
    #*****************************************************************************
    PS1='cwis:$PWD
    $ '
    #****************************************************************************
    # Create custom commands. All can be removed/altered *except* 'printers.
    # Feel free to create your own custom commands.
    # The command 'printers' is necessary for the proper functioning of the cwis
    # printer-choosing utility. The 'printers' program changes the line that
    # sets default printer queue in this file, and this file gets "run" again
    # to load the new value into the user environment.
    # The command 'more' is altered to call the more capable 'less' pager. Disable
    # this alias if you want to use the 'more' pager.
    # The command 'ls' is set up to identify executable
    # files with an * and directories with a /. Remove this alias if you want
    # the ls command to behave normally, i.e. without the * and /.
    # The command 'edit' is set up to call default editor (see EDITOR=... above).
    # The command 'oldmenu' brings up the old cwis menus.
    # The command 'logout' calls the Unix command 'exit' to log out.
    # The command 'webperms' sets up file permissions to be world-readable, for
    # web publishing.
    # The command 'regperms' returns file permissions to readable by user only.
    #****************************************************************************
    alias printers="/share/gen/bin/printers;. $HOME/.shrc"
    alias more="less"
    alias ls="ls -F"
    alias dir="ls -F"
    alias edit="$EDITOR"
    alias oldmenu=". /usr/local/bin/cwis2"
    alias logout="exit"
    alias quit="exit"
    alias bye="exit"
    alias log="exit"
    alias webperms="umask 022;chmod -R a+r $HOME/public_html"
    alias regperms="umask 077"