CATEGORY: SSH/TELNET
Information regarding SSH and TELNET

QUESTION:
A Unix Primer for Dos Users

ANSWER:
A Unix Primer for DOS Users


DOS Command Unix Equivalent
cd cd /
dir ls
copy cp
move mv
del rm
deltree rm -r
mkdir mkdir
rmdir rmdir

A few notes on the Unix filesystem.
-CAUTION: Unix gives very few warning messages about manipulating files. Eg. if you
tell the system to delete all files or a large directory tree it will.
-Unix uses the slash '/' whereas dos uses the backslash ''
-Filenames have no limit on their length.
-Files may have multiple extensions greater than 3 characters each
(eg. backup.domains.012398)

Useful Unix Commands

ps=Show processes. Displays all active programs you are currently running.

df=Device free. Shows hard drive usage.

who=Who. Shows all users currently logged onto this server.

finger=Finger. Similar to who. May be given a username as a parameter in order to get information about that user. For example finger .

ctrlz=Stops the current program/job.

ctrlc=Stops and kills the current program.

kill=Kill. Requires a process number as a paramenter in the form of kill %.
For example kill%1. USE WITH CAUTION, or better yet, simply always do a ctrl c.

su=Set User. Allows you to have root access on systems where you do not recieve it automatically at logon.
SU will prompt you to enter the root password. You may also use the command to 'assume' the identity of
any system user. For example, su jean. This can be useful for testing purposes.

./=Run. "./" is the unix equivalent of a run command. The syntax is: ./

tar=tar. Tar is a program which combines directories and their files into one single file archive. This archive is typically compressed. It is useful when relocating a user or domain to another server. The
two most common usages of this command are illustrated below:

tar cvfz filename.tar.gz * (This will create an archive of all files and directories branching off of this directory, inclusive. Tar will copy symbolic links, but not what they link too.)

tar xvfz filename.tar.gz (This explodes the tarred file created above)

rcp=Remote Copy. This command allows you to copy a file from one server to another, without having to manually ftp it. The syntax is:
rcp filename :

eg. rcp filename.tar.gz tlg.yourwebhost.com:/www/htdocs/jean/

grep=grep. Grep allows you to search a file or even a whole directory for a specified string. The syntax is
grep . Eg. grep jean /etc/domainalias. This would look for the string 'jean' in the file /etc/domainalias.

ftp=File Transfer Protocol. FTP is a program used to exchange files between servers. It is invoked by typing ftp. It can accept a hostname as a parameter, eg. ftp yourwebhost.com.

telnet=Telnet. Telnet is a program used to logon to another server. It is typically invoked with the following syntax: telnet .

lynx=Lynx. Lynx is a text based web browser. It is useful for checking to see that new accounts have been properly setup. Lynx is typically invoked with a url as a parameter. For example: lynx espn.com

Misc: Symbolic Links. A symbolic link, is a link to a file or directory. For example you can typically access the directory /usr/home/jean by typing cd /home/jean. This is because a symbolic link exists which
directs /usr to /usr/home. All new accounts have symbolic links in their /usr/home/username directories.
One of these is to www. The symbolic link www points to /www/htdocs/domainname. Thus, if
a user logs on, and types cd www, he will actually be in the directory /www/htdocs/domainname.


VI: A Brief Summary

VI stands for visual editor. It is the most commonly used means of editing files on unix servers. It is typically invoked by typing: vi . If the file exists it will be opened for editing. If the file does
not exist, it will be created (note it must be saved before it will actually exist).

Commands
esc=command mode
i=insert before
a=insert after
shift+a=insert at end of line
shift+g=goto end of file (special use: While in command mode type a line number, then hit shift+g. This will goto the line number typed)
ctrl+f=scroll forward one page
ctrl+b=scroll back one page
/=search. (special use: After typing / enter the string you wish to search for and press enter.)
:=While in command mode, pressing colon allows you access to the following commands:
w=write (saves file)
q=quit (exits vi)
wq=write quit(saves file and exits vi)
q!=exits vi without saving
(escape returns to command mode)
#############################################
Another VERY EASY text editor in UNIX is:
pico
So, to edit a file you would type:
pico filename
############################################################

Please be advised that this is a SUPPLEMENTAL Online Manual.

The PRIMARY Online Manual is inside your Online Control Panel... to access it, just click Documentation link at very bottom of Online Control Panel screen.

You should always consult the Online Manual inside your control panel first... and only consult this SUPPLEMENTAL Online Manual as a last resort.

if after consulting the Control Panel Documentation, you still need assistance, please CONTACT SUPPORT

top