-
November 5th, 2001, 06:34 PM
#1
Ultimate Guide to MS-DOS
|-The Ultimate Guide To MS-DOS-|
Author- Ennis
Contact- nho@hackermail.com
______________________________________________
OK, first of all Windows, I hear screams of lame security and I agree. However every newbie I have every known runs Windows and with the new Script Kiddie culture it is now easier to use Windows as an assault computer and the need for Linux/other OS has declined.
So I have decided to begin with Windows and DOS.
The main reason for this text is that DOS is vital to computer history. The term DOS [ disc operating system ] has become synonomous with operating systems.
This tutorial will show you how to do basic groundwork using MS-DOS which most of you will have especially if your running Windows.
I will begin with DOS as without it Windows is nothing so if you aint interested in DOS then skip to the Windows section.
* ABOUT MSDOS
MSDOS is probably the most widely used operating system in the world today. It is produced by a company we all know Microsoft and was first called
QDOS [ Quick and Dirty Operating System ] but has developed considerably since then.
The original DOS system was made by Tim Patterson and was only 4000 lines of assembly code.
* MSDOS Commands
Since MSDOS was developed later than CP/M it has a wider range of commands available to the user. With nearly 30 built in commands and several additional programs available MSDOS is a powerful operating system.
Here is a list of the main MSDOS commands.
BREAK- allows break key interuption during programs
CLS- clears the video display
COPY- copies files
CTTY- defines the device to be used for input
DATE- sets and displays the date
DEL- deletes named files
DIR- displays list of files on disc
ERASE- erases all files on disc
MKDIR- makes a sub-directory
PATH- sets up search path through sub-directories
PAUSE- stops operation for user response
PROMPT- selects the character to be used as the system prompt
REM- identifies a remark line which the system displays on the screen not executed
REN- renames files
RMDIR- deletes sub-directory
TIME- sets and displays current time
TYPE- lists contents of file to the display
VER- gives the version number of the operating system
VERIFY- sets the discs to read after write to verify data
>>>External command files normally supplied with MSDOS include-
CHKDSK- checks the file structure of discs
DISKCOPY- copies discs
EDLIN- simple line editor
FORMAT- formats blank discs
MORE- pages output into single screens
RECOVER- salvages programs from currupt discs
SORT- used to sort data
_______________________________________________
*LOADING MSDOS
Although it is unlikely that this section will be used by a lot of people i have included it in case anyone ever needs to load MSDOS whatever the reason or problem may be.
OK, here we go MSDOS is supplied on a single floppy disc, these days it should come with Windows. Search around for the disc then stick it in to your computer.
After the MSDOS disc has been inserted you will get a reply on your computer screen, ending with the system prompt
A>_
This shows you that MSDOS has loaded, and is waiting instruction.
NEXT we have to check the directory..
* CHECKING THE DIRECTORY
Now that we have the system prompt we can check what programs are present on the disc.
To do this we use the DIR command, by entering this we will get a list of all files in drive A. {a>_}
A whole load of information will pass the screen eventually stopping at the number of files and how much space is available on the disc.
If there are loads of files on the disc, then the DIR command will try display all of these on a single screen.
To modify this we can add a /W suffix.
DIR/W
which tells DOS to display the directory in wide format.
However this omits the file size and date of last amendment.
So another option is to add the suffix /P
DIR/P
This shows 23 lines of the directory to be displayed, and a keystroke moves onto the next 23 lines.
_______________________________________________
* COPYING FILES
The copy command is in-built into DOS. With copy you can move files from disc to another.
When copying files the new file can have a new name if required.
The command
COPY File1.txt File1.bak
will make an exact copy of file1.txt.
* RENAMING FILES
When copying files it is possible to give the new copy file a different name than the origanal just as in Windows.
DOS also allows you to rename files without copying them.
REN is used for this command.
REN File1.txt Fileone.txt
Also the command
REN*.txt*.doc
will rename all .txt files as .doc files on a disc.
* DELETING FILES
To delete unwanted files use the DOS command DEL.
As with COPY and REN you can remove all files in one go with the command
DEL*.*
but you will recieve the prompt
ARE YOU SURE?
Be careful with this command DOS is not designed to recover accidently deleted files.
_______________________________________________
* MORE ABOUT DIRECTORIES
Files such as .txt files can be specified in the directory in DOS using the command
DIR*.txt
this will show all files such as .txt or .doc
Also remember DOS directories are not in alphabetical order.
_______________________________________________
* BATCH FILES
MSDOS assumes that any file you create with .BAT is a batch file and will execute any commands in the file sequentially.
By creating a .BAT file you can perform complex and repetitive tasks easily.
One of the uses for a batch file is to configure the computer when it is on. For this purpose DOS looks for the AUTOEXEC.BAT file which stands for
AUTOmatically EXECute .BATch
* FILE TYPES
The type of file on a disc is indicated by the suffix that follows also known as its extension.
Here is a list of extensions.
.ASM - 8086 assembly language source code
.BAK - backup file
.BAS - basic source code
.BAT - batch command file
.COM - executable command file
.EXE - relocatable executable file [most commen]
.LIB - library file
.MAP - list file from linker
.$$$ - temporary system generated file
There are many more but too many to name.
%%%hint: viruses usually contain odd extensions such as .VBS etc. but fool user by appearing in an e-mail like so
HAPPY.TXT.vbs
this can easily fool relaxed users.
_______________________________________________
* CHANGING THE PROMPT
Normally MSDOS prompts the user with the current drive letter
A>_
However the system prompt can be altered by software to produce a customized prompt.
This is done by entering PROMPT followed by text or special characters.
HERE is a list of some of them
CHARACTER RESULTING PROMPT
$$ the '$' character
$t the current time
$d the current date
$p the current directory of the hard drive
$v the version number
$n the default drive
$g the '>' character
$i the '<' character
$b a blank space
$s a space [leading only]
$h a backspace
* COMMAND EDITING
Each time you enter a command in DOS it is stored in a special place in the memory known as a template.
So to save time with writing in commands they can be altered to 1 or 2 keystrokes.
However these vary from machine to machine so youll have to see what applies to your pc.
HERE is an example of Command Editing..
if you wanted to TYPE a .txt file and mispell TYPE as BYTE then the following commands will correct the line.
BYTE File1.txt
<NEWLINE>
T
<COPY1>
P
<COPYALL>
which results in
TYPE File1.txt
_______________________________________________
-
November 5th, 2001, 08:19 PM
#2
Very good job I think, Keep it up. Things like this will teach the skript kiddies that you don't need a program to do it. Your own operating system can do it for you. Thus creating an end. I don't know I was never a sckript kiddie, I new that if it is possible for a program to do it then there is usually a mannual way, which is better because what are the lame skript kiddies going to do when they don't have access to programs, all they have is the stantard OS. You are providing input for the brain so good thread.
-
November 5th, 2001, 08:49 PM
#3
That bought back alot of memories, thank's
-
November 5th, 2001, 08:52 PM
#4
addendum
I think, for any new user that wants to learn msdos, another program will be very usefull:
help
It covers most, if not all, msdos-commands, almost all of them with an example. And really, it isn't that hard to learn.
To use help, be sure to have installed ms-dos. Versions coming with win9x don't have 'help'
-
November 6th, 2001, 02:50 AM
#5
Member
ahh the good old days
yes msdos was my second OS.. first was a basic system similar to GWbasic (commodore 64 rom). Anyway, a good thing to point out is differences between versions of DOS... reasons why to use it and stuff like that. I personally loved programming in Dos. I still love my quickBasic complier. when i have more time, i might expand on ennis' thread here inan advanced tutorial. but any msDos questions can be directed at me too ![smile](https://antionline.com/images/smilies/smile.png)
i'm always happy to help with the "old school" comptuers...
i still have 4 386's \
-
November 6th, 2001, 05:45 AM
#6
very nice...
hey ennis great job man...i really learned..something out of it thanks...
but ennis one suggetion to u..
i will be very greatful to u if u post one tutorial in detail about batch file programming.
thanks
intruder...
-
November 6th, 2001, 05:57 AM
#7
Senior Member
more help
Also remember that if you want to know more about what a particular command does or what flags you can use with it use the following syntax:
[command name] /help
-
November 6th, 2001, 06:16 AM
#8
Re: more help
Originally posted by Stronzo
Also remember that if you want to know more about what a particular command does or what flags you can use with it use the following syntax:
[command name] /help
Don't forget...
[command name] /?
And, if very desperate (More for *nix stuff though)
[command name] -h
[command name] --help
[HvC]Terr: L33T Technical Proficiency
-
November 6th, 2001, 06:29 AM
#9
Senior Member
Re: Re: more help
Originally posted by Terr
Don't forget...
[command name] /?
My bad. Oops. That's what I meant
-
November 6th, 2001, 08:52 AM
#10
A year ago friend of mine tell me that MSDOS will put in history because it will no longer used as an operating system. I have no comment about it. For me, DOS is really powerfull OS.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|