Home
|
Helpdesk
|
Product Help
|
Showroom
|
Website development
|
Using Unix
This section should tell you all you need to know about using cgi scripts on our commercial Web solution.
Contents
Introduction
Using telnet
UNIX commands
Introduction
Our Web server runs Apache. In order to manipulate your files on the server and to set the relevant permissions for your cgi scripts to work, you will need to understand and use a few simple UNIX commands via telnet.
This document is not a tutorial on UNIX, but does list the commands that will be available to you through telnet. If you need further information or want to learn more about the UNIX operating system you should either refer to a book about UNIX or consult one of the online references.
If you have not used a UNIX system before, it can appear daunting at first. However, a large number of books on using UNIX are available from any good computer bookshop. There are also references available online.
Using telnet
FTP is used to upload your pages to the Web server. You may find that you will want to move your files around and create directories, this is where telnet is useful. You will also need to use telnet to set the execute permissions on any cgi scripts you may have uploaded to the cgi-bin directory.
To telnet to your Web account, you need to connect to the machine or host
uk-upload.demon.co.uk
giving your login name and password (the same ones you will have used to upload your pages using FTP).
Once you are connected you can use any of the commands listed below to manipulate your files.
UNIX commands
- The UK-based Information Technology Training Initiative provides UNIX Help for Users - a beginner's guide to UNIX on the Web.
- If you have used MS-DOS, you may also want to consult UNIX for DOS users, a table showing the UNIX command equivalents to various DOS commands.
The commands available on our WWW server are:
gunzip
Uncompress your *.gz, *.tgz or *.Z archive.
unzip
Extract files from a *.zip archive.
tar
Extract files from a *.tar archive.
ls
List the files in a particular directory. Use on its own for a directory listing, use ls -l (the space is important) to view a full list including the file size and permissions.
htm2
Recursively convert filenames from *.htm to *.html. (If executed in a given directory, converts filenames for all files ending in .htm in the current directory, and all lower directories.)
dos2unix
Will convert DOS files to UNIX format. Useful when you have uploaded a cgi script in binary format.
pwd
type pwd (Print Working Directory) at any time to find out exactly where you are in your site.
cd
use cd dir-name to move from the current directory down a level to a sub-directory, use cd .. (that's space period period) to move up a directory level.
cp
Copy files from one place to another. This is the only command you should use when you copy files directly to /docs.
mv
Move files and directories. This command is useful for moving files within directories, but must not be used for copying files directly to /docs.
You can also use this command to rename files: mv oldname newname.
mkdir
Create a new directory within the current directory.
rm
Delete files or directories from within the current directory.
Note: the UNIX system does not permit deleted files to be undeleted!
Use rm with caution!
You will need to use rm -r to remove your directories.
chmod
Change the permissions on files.