|
|
|
|
Command
|
cd
|
|
Description
|
cd Change directory
This command is used to move around directories (folders) on the server
|
|
Usage
|
cd
This command entered on it's own would return you to your home directory
cd folder1/folder2
Entering the above would move you from your current
directory to folder2 directory
cd .. Entering
the above would move you up one level in your directory structure (note the
space between cd and the dots)
|
|
Other Information
|
Entering a full system path to a directory will take you
to that directory. Otherwise folder2 as shown above Must be a subdirectory of
folder1 which Must be a sub directory of the current directory
|
|
|
|
|
Command
|
pwd
|
|
Description
|
pwd Print working directory
This command is used to show the current directory path
|
|
Usage
|
pwd
This command will return the full system path to the current directory.
eg if you were in a directory called home and
entered pwd you might get a output like
/usr/local/apache/home
|
|
|
|
|
Command
|
ls (
lowercase" L" )
|
|
Description
|
ls List Files
This command is used to list the files and sub directories in the current
directory
|
|
Usage
|
ls
This command entered on it's own would list all the files and directories in
your current directory
ls systempathto/home
Entering the above would list
the contents of the home directory (use the full system path)
eg ls
usr/local/apache/home
would list the contents of home directory
|
|
Other Information
|
ls has
several switches
Usage
ls switch
path
ls - l
Entering the above will produce a list output in
long form
shows additional information such as the files permissions etc.
ls - t
Entering the above will produce a list output
sorted by the time stamp of the files
ls - a
Entering the above will produce a list output
including hidden files like dot files eg .htaccess
ls - al
Entering the above will produce a list output
including hidden files in long (full) format
ls - l /full/system/path/to/home
Entering the above will produce a list in long
form of the home directory
|
|
|
|
|
Command
|
mkdir
|
|
Description
|
mkdir Make directory
This command is used to make a new directory (folder)
|
|
Usage
|
mkdir directoryname
This command will make a new directory named directoryname
|
|
Other Information
|
mkdir
switch
Usage
ls switch
directoryname
mkdir - m permission
directoryname
Entering the above will make the directory directoryname
with permissions set to permission
Example
mkdir -m 744 thisname
Entering the above would create a directory named
thisname with it's
permissions set to 744
|
|
|
|
|
Command
|
which
|
|
Description
|
which Which path
This command is used to locate a command file on the system
|
|
Usage
|
which perl
Entering the above would output the path to perl on the system If there is more
than one version installed it would result by listing all instances found.
Another example
which perl5
Would result in the system path to perl version 5
|
|
Other Information
|
Another command with similar results is
whereis perl
another example
whereis sendmail
Would result in the system path to sendmail
on your server
TIP: If you get
lots of results look for one that is in the /usr/ directory and ends in just
sendmail .This should be the path you require.
|
|
|
|
|
Command
|
perl
|
|
Description
|
perl invoke the perl
interpretor
This command is used to run a perl program from telnet or command line prompt.
|
|
Usage
|
perl filename
Entering the above would run the script named filename Example:
perl test.cgi
would run test.cgi
script
Note you would need to be in the directory in which test.cgi resides.
|
|
Other Information
|
To use this command with a specific version of perl you would use the full
system path to that version of perl
Example: /usr/bin/perl5
test.cgi
Would run the script test.cgi located in the
current directory using the perl5 interperator located at /usr/bin/perl5
|
|
|
|
|
Command
|
chmod
|
|
Description
|
chmod Changes the permissions
of a file or directory
This command is used to set the permissions i.e. who can read, write or
execute a file or directory
|
|
Usage
|
chmod Is
a subject on it's own
Click
here for more details
|
|
|
|
|
Command
|
crontab
|
|
Description
|
crontab Crontab is a task scheduler
This command is used to schedule tasks to be carried out a prearranged times or
dates
|
|
Usage
|
crontab Is
a subject on it's own
Click
here for more details
|
|
|
|
|
Command
|
man
|
|
Description
|
man Manual the help files
This command is used to give you access to the help files held on the server
|
|
Usage
|
man command
Example:
man chmod
would send the help file on the chmod command to your screen a screen full at a
time
Note: Press the spacebar for the next screen full or type q
to quit man -k
keyword Example:
man -k copy
will display a one line overview of each command that has copy
in it's description man
-k 'phrase' Example:
man -k 'move
directory'
will display
a one line overview of each command that has the phrase move
directory
in it's description
|
|
Other Information
|
The manual is split up into 8
sections listed below
- 1 User Commands
- 1M System
Admin Commands
- 2 System Calls
- 3 Library Functions
- 4 File formats
- 5 Headers Macros and
Tables
- 7 Special Files
- l Local
Commands (lowercaseL)
When you get see also commandname(3)
it means there is more details supplied in manual section 3 (library formats.
to view that you would enter the following command
man 3 commandname
|
|
|
WARNING
USE WITH CAUTION
|
|
Command
|
rmdir
|
|
Description
|
rmdir Remove a directory (
Delete )
This command is used to delete a directory
WARNING USE CAREFULLY THERE IS NO RECYCLE BIN !!!
|
|
Usage
|
rmdir directoryname
This will remove the directory directoryname
|
|
|
WARNING
USE WITH CAUTION
|
|
Command
|
rm
|
|
Description
|
rm Remove a file ( Delete )
This command is used to delete a file
WARNING USE CAREFULLY THERE IS NO RECYCLE BIN !!!
|
|
Usage
|
rm name
This will delete the file name
rm *.cgi
This will delete all the files in the
current directory with the extension cgi
rm *.*
This will delete all the files in the
current directory
|
|
|
|