Directories and Files
1. This assumes you are sitting at a command line prompt in a shell account or terminal, its what you'd get if you used ssh or Putty to log into tentacle.net. Your prompt probably looks like
- chaos%
or
- %
or
>
Prompts are customizable, more about that latter.
2. You'll probably see some half useful, half humorous text on in the terminal (that thing with the prompt in it), this is most likely the motd or message of the day.
- motd
to read it again. Or if its boring and you'd rather know the date and time try
- date
3. Now that you can use unix to check the date and time you've learnt it all. Except everything else. Try out
- ls
This will show you a listing of the contents of your directory that you are currently in. To see which directory this is try out
- pwd
I've no idea what pwd stands for, maybe its Russian for What the Heck Directory is this Anyway. You should now try out
- cd public_html
4. Something to note early on as it wasn't shown to me till later is tab completion, in that last command you could get away with typing
- cd pu
and then hitting the tab key. Good old unix will turn your half typed command into
- cd public_html
Because it knew the only possibly thing that you could be refering to with
- cd pu
is actually
- cd public_html
Now if you have a public2_html directory, you'll have to type
- cd public2
before you can hit tab, because up until then you could mean either. Try out tab completion, it really saves on typing.
5. Also the history of your priorly entered attempts at unix commands or anything you happened to hamfistedly type at the command prompt can be accessed by pressing the up and down arrow keys. This is useful, and saves on the typing too.
6. Now do a
- pwd
if you are in your public_html directory type
- pico index.html
(you can tab complete that command after having typed
pico i
most likely). This will put you into the pico text editor. Move around with the arrow keys, use backspace or delete to backspace or delete, change the sentence that says I'm lame, I don't have a webpage yet to. I'm not lame, ha, see its a web page. Then hit
- control-x
Answer that you'd like the file saved and that you'd like to call it index.html
7. You should be back at the prompt, now us a
- cd ..
this will move you one directory back, its actaully a special directory that is in each newly made directory
- mkdir newdirectory cd newdirectory ls -a
If you hit return after each of those commands, you'll be in your newly made directory seeing a listing of that special directory .. that when changed to, brings you one directory back.
8.
- cd .. ls
You see newdirectory? If so try out
- rm -d newdirectory
rm is the remove command, and that -d is a flag that stands for directory. Try typing
- man rm
This is the manual page for the rm command, confusing isn't it. I find I generally need concrete examples of flag modified commands. Type
- q
This quits out of a man page, you can also scroll up or down in using the arrow keys, or page up and page down, or space to go down a page.
9. So you've learned
- motd date ls ls -a
cd <directoryname> pwd pico
pico <filename>
mkdir <directoryname>
rm -d <directoryname>
man <commandname>
And tab completion, and how to scroll up and down through your history of previous commands.