Training for the install on DOS
If you are not
particularly familiar with the command line, now is your
chance to have a go ... whilst still in Windows.
Click on start and then look somewhere like All
Programs > Accessories > Command Prompt. It can
vary according to how you have your system configured.
Another way is to click on Start and then Run. In the
combo box, type 'command' (no quotes) and the command
prompt will open up.
With the command prompt now running (you will realise
that Windows XP is really just a very complicated and
slow command shell) you can type in commands that will
allow you to navigate the file system and manipulate
files and directories.
Your command prompt will probably be something along
the lines of...
C:\Documents and Settings\Owner >
If you type
you will get a listing like the one above. You can see
the date and time that a file was list written to ,
whether it is a file or a directory, how big it is if it
is a file and the long name of the file or directory. At
the top of the listing, you can see the name of the
volume (partition in this case - here called 'XP') along
with its serial number and the path for the directory
(C:\Documents and Settings\Owner). At the bottom of the
listing are the total numbers of files and directories.
If we want to make one of these directories current,
we need to type CD ('change directory' or [make] 'current
directory' depending upon whom you ask) and then the name
of the directory we want to go to. For example, if we
want to go to the 'Start Menu' directory, we type...
cd Start Menu
Note that in DOS, the case of the letters does not
matter so CD, cD, Cd and cd are all equivalent as are
similar variants of the directories you want to visit.
Another way of going to the Start Menu directory is to
cd C:\Documents and Settings\Owner\Start Menu
This way is using an absolute path (right from the
beginning) whereas the first way was a relative path. You
can see that there is a lot more typing involved however,
this is the only way so far, that we have of getting back
to the Owner subdirectory. You will notice in the
screenshot above that there are two directories
apparently with the names '.' and '..'. If you type
you get back to C:\Documents and Settings\Owner -
effectively we were CDing to the directory above (which
is what '..' is). However, supposing you were in
C:\Documents and Settings\Owner\Start Menu and wanted to
go directly to the Windows directory. Now that we know
how to go up a level and also down a level, we can
combine the two so, if we are in C:\Documents and
Settings\Owner\Start Menu, we can type...
and we can get there in one step.
If you now press the up arrow key, you will see that
all of the commands that you have typed in so far (this
goes on up to a limit) will appear - this can save you
typing as you can edit these and just press enter.
So much for moving around. We can also create, copy
and delete files and create and delete directories.
In C:\Documents and Settings\Owner, type
If you type dir now, you will see that we have created
a directory called 'test'. If we CD to it ('cd test') and
then get a listing ('dir'), you will see that it already
contains two files, '.' and '..'. Again, you can use cd
.. to get to the next level up but don't do that just yet
as we are going to create a file. Type...
dir > dirlst.txt
This is the same dir command as before but instead of seeing the
output listing on the screen (the standard output or
'STDOUT'), we are 'redirecting' it to a file that we are
creating called 'dirlst.txt' by using the greater-than
sign to indicate that the output of the dir command
should form the input of the file dirlst.txt. If we then
you will see the contents of the file (if this looks
confusing, look at how large the drlst.txt file is). This
command calls a program called 'more' and passes the
string 'dirlst.txt' to it which it then interprets as a
file name which it then opens and displays the contents
of on the screen.
You can see in the screenshot on the right these
- dir - gives the directory listing on the screen.
- dir > dirlst.txt - redirects the listing to a
- dir - now shows the new file we have created (344
- more dirlst.txt - shows the contents of the file
including our zero-length file.
We can now copy the file to a new location (or file
name) by typing...
copy dirlst.txt dirlst2.txt
If you dir the directory again, you will see that this
new file has been created and if you more it, you will
see that it is the same. There are many other ways of
creating files so let us delete this one. Type...
and if we now dir the directory, we see that it has
disappeared, leaving just the new file and '.' and '..'.
If we now cd up a level ('cd ..'), and type
we cannot delete the directory because there is still
a file in it. So, let us type
If we type
we can see that the directory is empty now. Next type
and the directory is deleted. Check this by entering
So, we have navigated around directories using
relative and absolute paths. We have looked at the
contents of directories when we have been in them and
from elsewhere. We have created, looked at, copied and
deleted a file and we have deleted the directory again.
Whilst this might seem a little basic, what you will need
to do for OpenBSD is not more complicated and the
commands are similar. Instead of using a backslash ('\'),
we use a normal slash ('/' which, unlike the BBC's
curious preference, is simply called a 'slash'), to list
a directory, you type 'ls' instead of 'dir', and instead
of 'copy' we use 'cp'.
You can learn more about the commands and get some
valuable experience by installing SuSE Linux (not the
Personal Edition as there are problems with root access
restrictions and gaining enough experience as root) and
playing around with that. I suggest SuSE Linux because it
is one of the UNIX-like operating systems, the commands
are pretty much the same and the installation is as easy
(although a few times quicker) than Windows XP. Also, you
will get a feel for the reliability and stability of the
When you are in one of the Unices, you can find out a
lot about the function you want to use (what it does and
how to do it) by referring to the manual. Instead of
using a several foot thickness of paper with all of the
environmental impact that would imply, they are all
online. You can literally type...
to find out more about the list command. If a command
is mentioned in several sections of the manual, you will
need to specify which manual to look in. In the OpenBSD
documentation, the manual section is always included
after the command so you will see ls mentioned as ls(1).
You can do this as follows...
man 1 ls
In addition to this, you can find the man pages for ls
online on the Internet at http://rootr.net/man/man/ls/1
and you can search for any other command as well. In
fact, if you type 'openbsd man ls' (no quotes) into
google, you will see that there are many such sites.