A nice telnet program, Easyterm, can be found at http://www.arachnoid.com.
Telnet was big back in the old days (1994).
Most isp's offered TELNET/SHELL access as a standard feature in a webhosting
package. Gradually this has began to disappear because it takes a lot more
monitoring of web servers to maintain security on servers where users have REAL
(non-virtual) accounts. This cuts into ISP profits and thus today you have many
huge, generic ISP clones that rely on software as their only means of security and have
substituted weak interfaces such as web-shells and cgi-wrappers for the real thing.
This is about like confusing a garden burger for a filet mingon. Telnet is by far
the MOST POWERFUL interface you can have into a web server. Telnet is not available
for NT users but is available on some of the better hosting companies.
Whenever you CONNECT to a server you use what
is called a PROTOCOL. There are SEVERAL protocols. Some of which you are
already familiar with. Here is a list of the ones you will be concerned with:
Most servers accessed through telnet will be
using the unix operating system. This section contains a sub set of unix commands useful
for navigating the system and managing files. The command descriptions use the following
command - use
- invocation with arguments and useful options
cd - change directory
- cd directory
Changes current directory to a new directory.
- This returns you to your home directory.
- cd ..
- This moves you up one level in the directory
- cd work
- This moves you to the subdirectory work within
the current directory.
- cd ~/mystuff
- This moves you to a subdirectory mystuff
within your home directory.
- cd /usr/users/joe/stuff
- This moves you to a subdirectory stuff in
Joe's home directory..
chmod - change access permission (mode) of a file
- chmod mode filename
Changes the file-access permission for the
specified file(s) to the specified permission(mode).
There are two ways to change permissions: through symbolic or numeric form. Numeric form
is described here. A file is assigned a numeric "mode" that is the sum of all
modes associated with the file. The modes are as follows:
400 - owner has read permission
200 - owner has write permission
100 - owner has execute permission
040 - group has read permission
020 - group has write permission
010 - group has execute permission
004 - world has read permission
002 - world has write permission
001 - world has execute permission
The lowest possible mode value is 000 - which means no one can read, write, or execute the
file. The highest possible value is 777 - which means everyone can read, write and execute
- chmod 777 notes
- The owner can read, write and execute notes.
The files specified group and all other users may only read the file.
ls - list files
- ls options directory
Lists the contents of the specified
directory. If no directory is specified, the contents of the current directory are listed.
- Lists the contents of the current directory.
- ls -l
- Lists the contents of the current directory in
long form - shows file-access permissons, owner, etc.
- ls -a
- Lists the contents of the current directory
including hidden ( dot files like .htaccess) files.
- ls -al
- Lists the contents of the current directory in
long form including hidden files.
- ls -t /user/user/joe
- Lists the contents of the Joe's directory by
mkdir - make directory
- mkdir options directory
Creates a new directory.
- mkdir test
- Creates a new directory called test.
- mkdir -m 744 work
- Creates a new directory called work with
permissions set to 744.
perl - invoke perl
- perl filename
- perl testscript.pl
- Invokes the perl interpreter for the file
- /usr/local/bin/perl testscript.pl
- Invokes the perl interpreter located at
/usr/local/bin/perl for the file testscripts.pl.
pwd - print working directory
Prints the full path of the current working
rm - remove file
- rm options files
Removes files, providing you are the owner of
the file or have write permission to the directory containing the file. This command can
also be used to delete directories.
Note: Use this command with caution. When a
file is removed, it is really gone. It does not go to a recycle bin or waste basket.
- rm test
- Removes the file named test.
- rm *
- Removes all files in the current directory.
- rm -r stuff
- Removes a directory named stuff and all it's
contents, including files and subdirectories.
- rm -i
- Removes files after verification from user.
tar - archive/dearchive files
- tar function options file
Writes files to an archive or extracts files
from an archive depending on how the command is configured. Technically tar stands for
tape archiver because originally most archives were stored to tape. However, tar writes to
and extracts from hard disks and diskettes as well as tape. The archive referred to by tar
is, in fact, a file itself, similar to a zip file.
Note that tar is slightly different than other unix commands because it has two sets of
options - a function option followed by another set of options. The most often used
c - create a new tar archive
x - extract files from within a tar archive
The most commonly used options are:
v - verbose mode
f - specify device (or file) to archive to or extract from.
- tar xvf codegame.tar
- Extracts all of the files in the archive
codegame.tar using verbose mode (prints a record).
- tar cf backup.tar /user/users/joe
- Creates a new archive named backup.tar of all
the files in the directory /user/users/joe.
which - which file corresponds to a command
- which command
List which file corresponds to the specified
- which perl5
- Displays the file path to perl5. i.e: