www.IRC-Junkie.org Forum Index
Menu
» Home
» Forum
» Articles
» Interviews
» Reviews
» Links


» Memberlist
» FAQ
» Search

» About this Website
» Syndicate
» Link to Us
» Contact Us
» #www.IRC-Junkie.org

We Value:
Usefulfreesoftware.com - Your guide to opensource software for Windows


mIRC Resources
Download mIRC Scripts, Bots, and Addons
French language mIRC scripting site

Download mIRC scripts, mIRC addons and mIRC bots.


Unix Command Primer

So you have rented some space to run your eggdrop or bouncer from. This usually is a Unix flavour system, and generally aint exactely around the corner of your house. And since eggdrop and bouncer and other goodies you can run on your shell are programs, you need some sort of connection with the computer where they are on. This is where telnetting comes in. Telnetting into your shell sets up a interface in which you can perform maintenance, start up programs and perform other tasks from your computer at your home.

(addition february 2002: nowadays it is more common to have a SSH connection instead of a Telnet one. SSH encrypts any data, where Telnet connections could be sniffed for passwords etc. Putty is a very popular (free) SSH client)

Windows computers have a standard telnet client build in, using start-run-telnet you can startup the Windows telnet program. Mac's not always have telnet clients build in the system. However, if you use telnet a lot, you might be better of using a freeware program or shareware program like CRT. If you are searching for a freeware telnet program, then give Tera Term a try.
These programs are much more convenient to use then the standard Windows telnet programs, and allow you to setup scripts and shortcuts for much used actions like typing login name, passwords etc.

Now lets talk some business. Shells are runned by using Unix commands, and you will have to learn some basic commands to use your shell properly. Dont fear tho, you certainly dont have to be, or become, a Unix guru, but you need some basic knowledge how to edit files (config files and tcl scripts for example), and move around the shell.

shell information and process handling

Of course its always nice to see what kind of shell you got. What kinda processes are running (programs like egg drop bots etc), how stable is the system, how many users are on it, etc etc. These commands show you what is going on on the system.

ps -x See what processes (programs) are running.
ps -ax See all processes running on the box.
kill -9 ### Replacing the #### with the pid number (ps -x) stops this process. (kill your eggdrop for example to restart it)
uptime The current time, how long the system has been running, how many users are currently logged on, and the system load averages for the past 1, 5, and 15 minutes.
(-v may be required on some systems)
quota Check how many available space you have, and what you have used sofar.
top Take a look at the top resource eating processes on the system.
who Shows the usernames of other ppl logged in the system right now.

moving around on the Shell

Here are the bare commands you need for moving through directories and seeing what kind of files are in directories.

ls Gives a list of files in the current directory.
cd Moves you to the root of your account.
cd directory/directory Moves you to the specified directory.
cd .. Brings you back one level in the directory structure. (being in /home/user/eggdrop and typing "cd .." brings you to /home/user/)
pwd Gives you the complete path of where you are now. Usefull for example to find out the path to your eggdrop file, which you need in the config file.

handling files

There gotta be a point somewhere that you need to delete, move or copy a file. When deleting a large number of files, you might want to startup your FTP program, and do it in one go in there. However, thats kinda daunting for just one file. Here some commands that help you along.

cp file file2 Makes copy of file, and names the new file file2, likewise "cp file /path/to/otherdir/file2" will put it in the specified directory.
rm file Removes file
rm -rf file Removes the file with force, use only when "rm file" fails (be carefull with this).
rm -rf directoryname Removes the directory and all its subdirectories and files.
mkdir directory Makes a directory
mv filename directorypath Moves file to the specified directory.
chmod 755 filename Makes filename executable, for example for botchk files.
wget http://www.someserver.com/path/to/file.tar.gz wget is a program to download files. With this command you would download the file "file.tar.gz" to the location on your shell where you are when executing that command.

archives

Of course you need some tools to extract the archives which contain your eggdrop, bouncer or other program that you want to run from your shell. When making a backup, it would be convenient to make a single archive as well from your whole eggdrop directory. Here are the commands you will use most of the time performing these tasks.

gunzip filename.tar.gz Unzips the file to filename.tar
tar -xvf filename.tar Untar's the file.
tar cvpf archive.tar directory Makes a tar file of the directory with the file name "archive.tar". Great for backing up your eggdrop directory etc.

using Pico

Pico is probally the most popular and easiest to use text editor. Here the basic commands that you will use the most. Pico comes with a nice help, so refer to that when you need more extensive help then the basics I give you here :o)

pico filename Starts up pico with the filename loaded. If the filename didnt excisted, you create a new file with that name.
pico directory/directory2/filename Same as above, but saves you the step of navigating to that directory.
ctrl-v scroll one page down
ctrl-y scroll one page up
ctrl-c Shows you the linenumber the cursor is on, handy when your getting errors executing the eggdrop :)
ctrl-w With this you can search for words etc in your file.
ctrl-x Quit pico, if file is changed, it will ask if you want to save it.
ctrl-g Pico's help pages.

And finally: the most important command: man command , this opens up the manual pages of the specified command.



? Discuss This Article here.


Server hosting | Mortgages | Car Tuning | Landscapes | Just Holden Commodores