|
|||||||||||||
|
Once you connect to FrogNet's "shell" you can use a variety of unix commands to navigate the many folders on your account, add and remove files, and even read your email.
Before you read this tutorial, make sure you've learned how to "log onto the shell." If you don't know what that means, then you should read the following tutorial before proceeding.
Definitions: The following definitions will help you to understand what UNIX commands are and how they are used.
UNIX "Pronounced you-nicks, a popular multi-user, multitasking operating system developed at Bell Labs in the early 1970s. Created by just a handful of programmers, UNIX was designed to be a small, flexible system used exclusively by programmers. Although it has matured considerably over the years, UNIX still betrays its origins by its cryptic command names and its general lack of user-friendliness. This is changing, however, with graphical user interfaces such as MOTIF." - taken from Webopedia.com
Telnet "Internet Networks host Internet terminal emulation Give Us Your Feedback A terminal emulation program for TCP/IP networks such as the Internet. The Telnet program runs on your computer and connects your PC to a server on the network. You can then enter commands through the Telnet program and they will be executed as if you were entering them directly on the server console. This enables you to control the server and communicate with other servers on the network. To start a Telnet session, you must log in to a server by entering a valid username and password. Telnet is a common way to remotely control Web servers." - taken from Webopedia.com
Shell "Sometimes called command shell, a shell is the command processor interface. The command processor is the program that executes operating system commands. The shell, therefore, is the part of the command processor that accepts commands. After verifying that the commands are valid, the shell sends them to another part of the command processor to be executed." - taken from Webopedia.com
| Command | Action |
| pwd | Stands for "Print Working Directory." It displays your current "location" on the machine. |
| ls | lists all the files in the directory you are currently in |
| cd [directory] | Stands for "change directory:" It moves your from directory to directory. |
| mkdir [name] | creates a new directory and assigns it a name which you supply. |
| rmdir [directory] | deletes the directory of that name |
| rm [file] | deletes a file. WARNING!!! CAN'T BE UNDONE. |
| mv [file-x] [file-y] | moves or renames the information in file-x as file-y |
| cp [file-x] [file-y] | copies a file and allows you to rename the copy |
| chmod | This command is used mainly for setting the proper permissions for CGI scripts. |
| dos2unix | dos2unix converts a file that was written on a WINDOWS machine into UNIX format. CGI scripts need to be converted to UNIX formatting or they will not work. |
| mac2unix | mac2unix converts a file that was written on a WINDOWS machine into UNIX format. CGI scripts need to be converted to UNIX formatting or they will not work. |
| passwd | prompts you to enter your old password and then lets you pick a new one |
This command stands for "print working directory." Much like Microsoft Windows or Macintosh; UNIX machines store files in folders or "directories." Folder and Directory mean the same exact thing for our purposes. All the pwd command does is display the path of the directory you are currently in.
Example:
adenine-> pwd
/home/joefrog
This command stands for "list." Those of you familiar with the DOS command line might recognize this command as "dir." All this command does is list the files in the current directory. There are additional options, or flags, that can be used with this command to give a more detailed listing of the files.
Flags:
l - long listing. "l" is a lower case "L" if you couldn't figure it out. Using this option will cause the Ls command to display file permissions, file size, the owner of the file, and the date the file was last modified.
a - all. Shows all files. Even hidden files. Any file who's name that starts with a period will be hidden from when you use ls To show hidden files, you must use this option
Examples:
adenine-> ls Mail mail pinerc013206 pinerca12319 pinercb10606 pinercb13644 dead.letter pinerc010606 pinerc013644 pinerca13206 pinercb12319 html pinerc012319 pinerca10606 pinerca13644 pinercb13206 adenine-> ls -al total 148 drwxr-xr-x 3 joefrog users 1024 Apr 11 11:48 . drwxr-xr-x 8815 root root 138240 Apr 11 11:48 .. -rw-r--r-- 1 joefrog users 24 Apr 11 11:48 .bash_logout -rw-r--r-- 1 joefrog users 220 Apr 11 11:48 .bash_profile -rw-r--r-- 1 joefrog users 124 Apr 11 11:48 .bashrc -rw-r--r-- 1 joefrog users 2067 Apr 11 11:48 .cshrc -rw-r--r-- 1 joefrog users 3166 Apr 11 11:48 .login drwxr-xr-x 2 joefrog users 1024 Apr 11 11:48 html adenine-> ls -a . .bash_logout .bashrc .login .. .bash_profile .cshrc html
This command stands for "change directory." It is used to navigate the various directories on your account. There are some shorcuts that can be used with this command to make navigating the shell even easier
Tricks:
Examples:
adenine-> cd /home/joefrog/html adenine-> cd ~joefrog/html adenine-> cd /usr/local/apache/logs adenine-> cd adenine-> cd html/perl adenine-> cd cd ../media
This command means "make directory." All it does is create a new directory with the name you assign it.
Example:
adenine-> mkdir perl
This command deletes a directory. The directory itself must be empty before it can be deleted.
Example:
adenine-> mrdir junk
This command deletes a file permanetly. You can not recover a file once it has been deleted. You can use wild cards to delete several files at once. The wildcard symbol is the asterisk and it stands for "anything."
Examples:
| rm joe.txt | deletes a file called "joe.txt" |
| rm *.txt |
deletes all files that end in ".txt" located in the current working directory. If the following files were located in the current working directory: joe.txt then this command would delete joe.txt and larry.txt but leave me.jpg untouched. |
| rm *car.* |
deletes any file that contains "car." in its name someplace. This would delete the following files: new_car.html and would leave the following files untouched: blah.txt |
| rm *.* | deletes everything but hidden files and directories. see ls for an explanation of what hidden files are. |
| rm blah/*.* | same as above, but instead of deleting items in the current working directory, it deletes all the files in a subdirectory of the current directory called "blah" located one level below the current directory. |
This command stands for "move file" You can use this command to move a file from one directory to another one and rename it in the process. You can use wild cards to move several files at once. The wildcard symbol is the asterisk and it stands for "anything."
Examples:
| mv joe.txt joseph.txt | renames the file joe.txt located in the current working directory to joseph.txt |
| mv *.jpg media/ |
This moves all the files that end in ".jpg" into a subdirectory that already exists called media. If the directory held the current files. happyface.jpg then this command would move happyface.jpg and bannerad.jpg into the media subdirectory but leave index.html untouched. |
This command stands for "copy." You can use this command to make copies of a file while giving the new copy a new name. This is great for making backup copies of files.
Examples:
| cp joe.txt joseph.txt | makes a new copy of the file joe.txt located in the current working directory. This contents of the new file, joseph.txt, is exactly the same as joe.txt only the file name is different |
| cp joe.txt joe_backup.txt | This does the same thing as the example above. Only this time we are showing a more common use of the cp command, making backups. |
| cp *.jpg media/ |
This makes a copy of all the files that end in ".jpg" and places the copies into a subdirectory that already exists called media. In this example, the files will have the same name. For example: If the directory held the current files. happyface.jpg then this command would make copies of happyface.jpg and bannerad.jpg and place the copies in the directory called media. However, index.html will remain untouched. |
This command changes the permissions for a file. This command is used mainly by people writing or using CGI scripts. For more info on chmod, read the intermediate CGI tutorial.
Examples:
The afore mentioned tutorial has plenty of examples.

This command changes a file from dos formatting to unix formatting. CGI scripts
must be unix formatted in order to run.
Examples:
dos2unix myfile.pl
chmod 700 myfile.pl
./myfile.pl
This command changes a file from mac formatting to unix formatting. CGI scripts must be unix formatted in order to run.
Examples:
mac2unix myfile.pl
chmod 700 myfile.pl
./myfile.pl
This command allows users to change your ftp, and telnet passwords. passwd cannot change passwords for your @frognet.net email box, email boxes in your virtual domain, or the password you use to dial into FrogNet. If you have a virtual domain and wish to change the password for an email box on your domain, you must use our webmail interface. It can be found listed under "Manage Your Virtual Domain Email" located on our mail page.
passwd will ask you for your current password and then ask you for a new password. New passwords must be...
IMPORTANT: People often opt to create basic, easily crackable passwords that use names, dates, or words that can be found in the dictionary. Doing so not only puts your account at risk, but endangers everyone on FrogNet! If you make a simple password, hackers could access your email, web page, assume your identity and possibly even get your financial information from email messages that you may have sent or recieved. Therfore, do not create silly, basic passwords. It WILL come back to haunt you, guarenteed!
Bad Passwords:
abc123
me
larry99
mycat
bobbyjoe
102868
Good Passwords:
2^jh[w3*
3EfW*a91
3-kou&A5
l@rrY99
m3ath3AD
You Expect Me To Remember That? We've had customers at FrogNet who have gotten very angry with us because we would not let them have a password like "bob" You should be happy that we wouldn't allow such an insecure password. It means your data is safer. The thing is, you don't need to remember your password on a daily basiss. There are plenty of easy ways to have a record of your password.
You could memorize it.
You could write it down on a scap of paper and carry it in your wallet like your liscence.
Write it on a piece of masking tape and stick it on your monitor.
Windows and Mac's allow you to save your password so you don't even have to remember it if you don't want to.
Do you know your social security number? How long is that compared to your 8 character password. Now, how often do you use your social security number compared to your FrogNet password? If you could remember some long strange sequence of numbers that you only use occasionally, you can easily remember your FrogNet password. Especially if you use the web a lot. It's not as bad as you think.
If you do opt to make a crackable password, your account may be shut off. We occasionally run a password cracking program to check our users passwords. Its one the several dozens of programs that any newbie hackers could use to break into your account. If we crack your account, we shut it off instantly. You can turn it on again by calling FrogNet and telling them that your password is no longer functioning.
Examples:
adenine-> password joefrog
Old Password: ********
New Password: 2hy^6Ui[
Confirm Password: 2hy^6Ui[
all authentication tokens updated
adenine-> vmpassword sales@megadomain.com
Old Password: ********
New Password: 2hy^6Ui[
Confirm Password: 2hy^6Ui[
all authentication tokens updated