Introduction to ModemSwitch On-Line Demonstrations Features Frequently Asked Questions On-Line Manual Low Prices Order On-Line Contact Us

ModemSwitch.com

Manual - Basic Unix Commands

Order On-Line Today! Host your Site with ModemSwitch
Chances are you will never need to use telnet and will never require any Unix commands. But just in case, here are some of the basics.

5.1)Unix commands

O.K. You've telneted on and would like to know a few commands? Well, you would be best served by buying one of the following books:

  • Teach Yourself UNIX in a Week published by SAMS.NET
  • Unix for dummies published by IDG Books
  • Learning the Unix Operating System from O'Reilly and Associates
But since you insist, described are some basic UNIX commands.

5.2) Plain file manipulation

    5.2.1) mv

    mv fred wilma

    This moves 'fred' to a file named 'wilma'. This is the Unix way of renaming a file.

    mv fred flintstones/fred

    This moves fred to a file named fred in the subdirectory flintstones. This example could have been written 'mv fred flintstones/' as well, and the filename 'fred' would have been retained in the new directory.

    After executing this command, there will no longer be a fred file in the current directory.

    5.2.2) cp

    cp fred wilma

    This copies 'fred' to a file named 'wilma'.

    cp fred flintstones/fred

    This copies 'fred' to a file named 'fred' in the subdirectory 'flintstones'.

    5.2.3) rm

    rm flintstones

    This removes a file named 'flintstones'.

    rm -rf flintstones

    This removes a directory named 'flintstones'. The '-r' removes the directory, the '-f' forces it to remove files without asking you before it deletes each one.

5.3) Directory manipulation

In order to keep track of the possibly millions of files on-line, Unix systems have a directory tree, which enables meaningful classification of files. For example, the most essential system programs are kept in /bin/, user home directories are all under /home/, and everything having to do with the WWW is under /www/. More specifically, your home directory is /home/you/ and the directory for your WWW files is /www/htdocs/you/.

    5.3.1) pwd

    pwd

    This prints out your working directory: where you are. When you give a filename to a command without specifying some other directory, the filename is looked up, manipulated, or created in your current working directory.

    5.3.2) mkdir

    mkdir flintstones

    This makes a subdirectory of the current directory named 'flintstones'.

    5.3.3) cd

    cd flintstones

    This changes the directory to the subdirectory named 'flintstones'.

    cd /home/flintstones

    This changes the directory to the home directory of the 'flintstones'.

    cd /www/htdocs/flintstones

    This changes the directory to the WWW directory of the 'flintstones'.

    cd

    With no arguments, 'cd' returns you to your home directory.

    5.3.4) rmdir

    rmdir flintstones

    This removes the subdirectory 'flintstones'. The directory must be empty for this to work.

5.4) Account management

    5.4.1) ln (redirecting file access)

    Type 'ln -s fred.html index.html' to redirect all file accesses from 'index.html' to the file 'fred.html'.

    5.4.2) Changing your password

    To change your password, type 'passwd'.

    5.4.3) Changing your account 'Name'

    To change your 'name' (this is what people see when they receive E-mail from you) type :

    chfn fred

    Replace fred with your own userid. Enter the 'Full Name' field and just hit return on the other fields.

When you host your web site with modemswitch we offer you so much more.