Look up your   Domain Name now. We can help you register it Today!  

Sales 1-888-818-5461
General +1-941-936-5461
Support +1-941-936-1409

 

 

 

 

 

 

Unix Tutorial

This brief tutorial is intended to give you the basics about a few simple, easy to learn UNIX commands that will enable you to do more with your Web Server. You do not need to know UNIX to use your server, but you will find your power to develop your web site seriously increased by these ten easy to use UNIX Commands.

NOTE: FrontPage users have limited access to their website directories. See our FrontPage page for more information.

Command List

pwd-- print working directory
ls-- list, equal to DOS "DIR".
mkdir-- make directory, equal to DOS "md".
rmdir-- remove directory, equal to DOS "rd".
cp-- copy, equal to "copy".
mv-- move, equal to DOS "move"
rm-- delete, equal to DOS "de".
grep-- search for a pattern in a file or files.
zip -- zip compresses a file or files.
unzip-- unzip decompresses a file or files.
passwd-- change your password.
chmod-- change file permissions

 

Command: pwd

Usage: The pwd command tells you what the current working directory you are in on your Virtual Server.

Example: Simply type "pwd" at a telnet command prompt and it will return something like "/usr/home/vserver/etc"

 
Top of Page
User Support Page


Command: ls

Usage: The ls command lists the files and subdirectories of the current directory you are in. You can also add some arguments to the ls command to make it more meaningful.

If you type "ls -F" it will append a forward slash to the subdirectory names so you can easily distinguish them from file names.

If you type "ls -a" it will show all hidden files such as .htaccess files.

If you type "ls -l" it will show detailed information about each file and directory, including permissions, owners, size, and when the file was last modified.

Example: Type "ls -al" at a telnet command prompt and it will return your file names including hidden files, and a forward slash will be inserted in front of subdirectories.

DOS Equivalent: dir

 
Top of Page
User Support Page


Command: mkdir

Usage: The mkdir command makes a new directory. Simply type "mkdir directory" at a telnet command prompt and replace directory with the name of the directory you want to create.

Example: Type "mkdir temp" at a telnet command prompt to create a new directory called temp.

DOS Equivalent: md, mkdir

 
Top of Page
User Support Page


Command: rmdir

Usage: The rmdir command deletes (removes) a directory. Simply type "rmdir directory" at a telnet command prompt and replace directory with the name of the directory you want to delete.

Example: Type "rmdir temp" at a telnet command prompt to remove a directory called temp.

DOS Equivalent: rd, rmdir

 
Top of Page
User Support Page


Command: cp

Usage: The cp command copies a file to a new location or filename. Simply type "cp filename copyname" at a telnet command prompt and replace filename with the name of the file you want to copy, and copyname with the name of the new copy.

You can also add a directory structure if you want to copy the file to a completely new location. Simply type "cp filename directory/copyname" and replace directory with the name of the directory in which you want the new copy placed.

Example: Type "cp home.htm index.html" at a telnet command prompt to copy a file called home.htm to a file called index.html

DOS Equivalent: copy

 
Top of Page
User Support Page


Command: mv

Usage: The mv command renames a file or moves it to a new location. Simply type "mv oldfile newfile" at a telnet command prompt and replace oldfile with the name of the file you want to rename or move, and newfile with the new name of the new file.

You can also add a directory structure if you want to move the file to a completely new location. Simply type "mv oldfile directory/newfile" and replace directory with the name of the directory in which you want the file moved.

Example: Type "mv test.conf test.old.conf" at a telnet command prompt to move a file called test.conf to a file called test.old.conf

DOS Equivalent: move, rename

 
Top of Page
User Support Page


Command: rm

Usage: The rm command deletes (removes) a file. Simply type "rm filename" at a telnet command prompt and replace filename with the name of the file you want to delete.

Example: Type "rm test.html" at a telnet command prompt to remove a file called test.html.

DOS Equivalent: del

 
Top of Page
User Support Page


Command: grep

Usage: The grep command finds lines in files that match specified text patterns. Simply type "grep "text" filenames" at a telnet command prompt and replace "text" with the word or phrase you want to search for, and replace filenames with the files you want to search in. To search all files in the current directory, simply replace filenames with * .

Example: Type "grep "for sale" *" at a telnet command prompt to find any files in the current directory that contain the text "for sale" in them.

 
Top of Page
User Support Page


Command: zip

Usage: The zip command compresses a file or list of files into a zip format archive file. This command is compatible with pkunzip on a pc. Simply type "zip zipfile file1 file2 file3" at a telnet command prompt and replace zipfile with the name you want to use for your compressed zip archive file, and replace fileX with the name of the file(s) you want to compress into the zip archive.

Example: Type "zip back.zip home.html index.html" at a telnet command prompt to compress and archive the files called home.html and index.html into the file called back.zip.

DOS Equivalent: pkzip

 
Top of Page
User Support Page


Command: unzip

Usage: The unzip command extracts a zip format archive file. This command is compatible with pkzip files from a pc. Simply type "unzip zipfile" at a telnet command prompt and replace zipfile with the name of your zip format archive file.

Example: Type "unzip old.zip at a telnet command prompt to extract the archive called old.zip.

DOS Equivalent:  pkunzip

 
Top of Page
User Support Page


Command: passwd

Usage: The passwd command changes your Unix password. This affects your Unix e-mail account, and your FTP and Telnet access. If you have Web-mail, this will not affect your web-mail passwords. If you have a FrontPage account, this will not affect your FrontPage authoring.

To change your password, simply Telnet into your account, and type:

passwd
Example:
% passwd
Changing local password for web2030.
Old password:
New password (8 significant characters):
Retype new password:
passwd: updating passwd database
passwd: done
% 
Notice your password is not echoed on the screen at all, not even with '*' asterisks.

IMPORTANT -- Make sure you have your new password memorized or written down and kept in a safe place.
If you loose your password, we cannot give it to you. We will have to issue you a new password, then you can telnet in and change it to whatever you like.
Avoid simple passwords -- use all 8 characters. Mix numbers and mixed capitalization characters, don't use words.
Top of Page
User Support Page


Command: chmod

Usage: The chmod command sets the permissions of a file or directory. In Unix files and directories have three sets of permissions: owner, group, and other (everybody else). You are the owner. Of course you want to be able to read your own files, make changes, and run scripts. The read, write, and execute permissions control this. The group and other permissions are next. Normally, you don't want anyone else to make changes to your website! By default, this is set to read-only. People can go into your directories, but cannot change anything, or upload files there.

The most frequent reason to use this command is to make cgi scripts executable. You do this by typing chmod 755 filename at the command line. The 7 means read, write, and execute for the owner (you), while the 5 means read and execute, but not write, for the group and other.

 
Top of Page
User Support Page