Monday, 14 May 2012

BASIC DOS COMMANDS

Occasionally on your Windows computer, you may need to perform a procedure by typing in commands at the 'Command Prompt'. Entering commands in this way allows you to bypass the Windows graphical user interface and communicate directly with the operating system. You are most likely to need to work in this way if you get an infection and have to disinfect your computer from the command line, for example, using one of the Sophos Resolve tools, or SAV32CLI or SWEEP.EXE.
To communicate through the Windows command line, you will need to use MS-DOS commands. This article lists some basic DOS commands that you are likely to find useful when working from the command line, but there are many more available. To find out more about MS-DOS, consult a book, online dictionary or encyclopedia, or other specialist publication.

Command and Usage
Examples
ATTRIB
Change file attributes. '+' adds an attribute, '-' removes it. Attributes are: A=archive; R=read only; S=system; H=hidden.
ATTRIB -R -A -S -H <VIRUS.EXE>
 

All these attributes will be removed from virus.exe.
C:
Go to the C: drive. Similarly A: and D: etc.
C:
CD
Change directory. When you change directory, the prompt changes, showing the path of the directory you are currently in.
Note, directory is the term used by DOS for what Windows calls a folder.
CD\ takes you to the top of the directory tree (typically to C:) .

CD.. moves you one level up the directory tree (i.e. up towards the root directory).

CD <DIRECTORYNAME> takes you to that directory. You can use one or more subdirectory names, separated by \ e.g.
 
CD WINNT\Media takes you to the directory C:\WINNT\Media
To change to another path, type the full path with slashes. e.g.
 
CD \WINDOWS\SYSTEM
CLS
Clear the screen.
CLS
DEL
Delete one or more files in the current directory. Can be used with the '*' and the '?' wildcards.
DEL *.* will delete ALL files in the current directory, USE WITH CAUTION.
(Note: DEL cannot be used to delete directories. Use RD to remove a directory.)
DEL <VIRUS.EXE> deletes virus.exe

DEL *.JPG will delete all files with the extension JPG.

DEL MY*.* will delete all files beginning with MY and with any extension.

DEL MY??.* will delete files that are 4 characters long and begin with MY and with any extension.
DIR
Displays the contents of a directory (folder).
Note, directory is the term used by DOS for what Windows calls a folder.
These switches can be combined, so DIR /W /P will return multiple rows listing a page at a time.
You can use the '*' and the '?' wildcards to search for a particular file. The ? character represents ONE character, and the * character represents multiple characters.
DIR *.* lists all the files in a directory.
DIR displays all files and folders in the current directory. Folders are indicated in the list by <DIR>.
Files are usually listed by name.

DIR /P displays the contents a page at a time, i.e. as many as will fit in your command line window. Press any key to display the next page.

DIR /W displays the files/folders in multiple rows. This view gives less information per file.

DIR *.JPG displays all files with the extension JPG in the current directory and all subdirectories.

DIR MY??.* displays all files beginning with MY, exactly 4 characters long, and with any extension.

DIR /S lists the contents of all subdirectories.

DIR /AH displays all hidden files.
EDIT
Runs DOS EDIT (a simple text editor). Useful for editing batch files and viewing logs. This command requires QBASIC.EXE to be present.
EDIT <VIRUSLOG.TXT> opens the file viruslog.txt and allows you to edit it.

EDIT <NEWFILE.TXT> creates a new file called newfile.txt and opens it up for you to edit.
HELP
Displays DOS Help. For help on an individual command, type HELP then the command for which you want more information.
HELP DIR displays information on the DIR command.
MD
Make directory. Creates a new directory below the current one. (The command can also be written as
MKDIR)
MD <NEWDIR> creates a new directory called Newdir.
PRINT
Prints the specified file (if the printer is supported in DOS - many are not).
PRINT <LOGFILE.TXT>
Prints LOGFILE.TXT
RD
Remove directory. Removes a subdirectory of the current directory. The directory you want to remove must be empty of all files. (The command can also be written as RMDIR)
RD <DIRECTORYNAME>
RENAME
Rename a file. You must use the full file name including the suffix.
RENAME <OLDNAME.EXE> <NEWNAME.EXE>
TYPE
Displays the contents of a file on the screen. If you use this command on a file which is not a text file, the display will be unintelligible. Use with "|MORE" to display the text on a page by page basis, and prevent it scrolling off the screen. "|" is a pipe character.
TYPE C:\README.TXT|MORE
>
When you run a DOS command, output is usually sent to the screen. Use > to redirect output from the screen to a file. It runs the command preceding the >, creates a file in the current directory with the name you specify, and sends the information/output returned by the command, to that file.
COMMAND > FILENAME.TXT
e.g. SWEEP > REPORT.TXT The details of any infected files reported by SWEEP are sent to a file called REPORT.TXT.

Accessing the command prompt from Windows
To access the command prompt from Windows (a 'DOS box'), do as follows:
  1. At the task bar, select Start|Run.
  2. Type "CMD"
  3. Click 'OK'.
A command prompt will open.

Accessing the command prompt in safe mode
  • For Windows NT/2000/XP/2003, see the knowledge base article on removing files with SAV32CLI.
  • For Windows 95/98/Me you can boot from a start up disk, or use MS DOS mode
    1. At the task bar, select Start|Shutdown.
    2. Select 'Restart in MS-DOS mode'.
    3. Click 'OK'.

Friday, 11 May 2012

WHAT IS COMPUTER HARDWARE?

Your PC (personal computer) is a system, consisting of many components. Some of those components, like windows xp, and all your other programs, are software. The stuff you can actually see and touch, and would likely break if you threw it out a fifth-story window, is hardware.

Not everybody has exactly the same hardware. But those of you who have a desktop system, like the example shown in figure 1, probably have most of the components shown in that same figure. Those of you with notebook computers probably have most of the same components. Only in your case the components are all integrated into a single book-sized portable unit.

                                   
                                        Figure 1
The system unit is the actual computer; everything else is called a peripheral device. Your computer's system unit probably has at least one floppy disk drive, and one CD or DVD drive, into which you can insert floppy disks and CDs. There's another disk drive, called the hard disk inside the system unit, as shown in figure 2. You can't remove that disk, or even see it. But it's there. And everything that's currently "in your computer" is actually stored on that hard disk. (we know this because there is no place else inside the computer where you can store information!).

                                     
                                       Figure 2
The floppy drive and CD drive are often referred to as drives with removable media or removable drives for short, because you can remove whatever disk is currently in the drive, and replace it with another. Your computer's hard disk can store as much information as tens of thousands of floppy disks, so don't worry about running out of space on your hard disk any time soon. As a rule, you want to store everything you create or download on your hard disk. Use the floppy disks and CDs to send copies of files through the mail, or to make backup copies of important items.

Random access memory (RAM)

There's too much "stuff" on your computer's hard disk to use it all at the same time. During the average session sitting at the computer, you'll probably use only a small amount of all that's available. The stuff you're working with at any given moment is stored in random access memory (often abbreviated ram, and often called simply "memory"). The advantage using ram to store whatever you're working on at the moment is that ram is very fast. Much faster than any disk. For you, "fast" translates to less time waiting and more time being productive.

So if ram is so fast, why not put everything in it? Why have a hard disk at all? The answer to that lies in the fact that ram is volatile. As soon as the computer is shut off, whether intentionally or by an accidental power outage, every thing in ram disappears, just as quickly as a light bulb goes out when the plug is pulled. So you don't want to rely on ram to hold everything. A disk, on the other hand, holds its information whether the power is on or off.

The hard disk

All of the information that's "in your computer", so to speak, is stored on your computer's hard disk. You never see that actual hard disk because it's sealed inside a special housing and needs to stay that way. Unlike ram, which is volatile, the hard disk can hold information forever -- with or without electricity. Most modern hard disks have tens of billions of bytes of storage space on them. Which, in English, means that you can create, save, and download files for months or years without using up all the storage space it provides.
In the unlikely event that you do manage to fill up your hard disk, windows will start showing a little message on the screen that reads "you are running low on disk space" well in advance of any problems.  In fact, if that message appears, it won't until you're down to about 800 MB of free space. And 800 MB of empty space is equal to about 600 blank floppy disks. That's still plenty of room!

The mouse

Obviously you know how to use your mouse, since you must have used it to get here. But let's take a look at the facts and buzzwords anyway. Your mouse probably has at least two buttons on it. The button on the left is called the primary mouse button, the button on the right is called the secondary mouse button or just the right mouse button. I'll just refer to them as the left and right mouse buttons. Many mice have a small wheel between the two mouse buttons, as illustrated in figure 3.

                                
                                      Figure 3 
the idea is to rest your hand comfortably on the mouse, with your index finger touching (but not pressing on) the left mouse button. Then, as you move the mouse, the mouse pointer (the little arrow on the screen) moves in the same direction. When moving the mouse, try to keep the buttons aimed toward the monitor -- don't "twist" the mouse as that just makes it all the harder to control the position of the mouse pointer.


If you find yourself reaching too far to get the mouse pointer where you want it to be on the screen, just pick up the mouse, move it to where it's comfortable to hold it, and place it back down on the mouse pad or desk. The buzzwords that describe how you use the mouse are as follows:

Ø   Point: to point to an item means to move the mouse pointer so that it's touching the item.
Ø     Click: point to the item, then tap (press and release) the left mouse button.
Ø     Double-click: point to the item, and tap the left mouse button twice in rapid succession - click-click as fast as you can.
Ø    Right-click: point to the item, then tap the mouse button on the right.
Ø   Drag: point to an item, then hold down the left mouse button as you move the mouse. To drop the item, release the left mouse button.
Ø  Right-drag: point to an item, then hold down the right mouse button as you move the mouse. To drop the item, release the right mouse button.

The keyboard

Like the mouse, the keyboard is a means of interacting with your computer. You really only need to use the keyboard when you're typing text. Most of the keys on the keyboard are laid out like the keys on a typewriter. But there are some special keys like esc (escape), ctrl (control), and alt (alternate). There are also some keys across the top of the keyboard labeled f1, f2, f3, and so forth. Those are called the function keys, and the exact role they play depends on which program you happen to be using at the moment.
Most keyboards also have a numeric keypad with the keys laid out like the keys on a typical adding machine. If you're accustomed to using an adding machine, you might want to use the numeric keypad, rather than the numbers across the top of the keyboard, to type numbers. It doesn't really matter which keys you use. The numeric keypad is just there as a convenience to people who are accustomed to adding machines.

                                     
                                   Figure 4
Most keyboards also contain a set of navigation keys. You can use the navigation keys to move around around through text on the screen. The navigation keys won't move the mouse pointer. Only the mouse moves the mouse pointer.
On smaller keyboards where space is limited, such as on a notebook computer, the navigation keys and numeric keypad might be one in the same. There will be a num lock key on the keypad. When the num lock key is "on", the numeric keypad keys type numbers. When the num lock key is "off", the navigation keys come into play. The num lock key acts as a toggle. Which is to say, when you tap it, it switches to the opposite state. For example, if num lock is on, tapping that key turns it off. If num lock is off, tapping that key turns num lock on.

Combination keystrokes (shortcut keys)


Those mysterious ctrl and alt keys are often used in combination with other keys to perform some task. We often refer to these combination keystrokes as shortcut keys, because they provide an alternative to using the mouse to select menu options in programs. Shortcut keys are always expressed as:

                                  Key1+key2
 
Where the idea is to hold down key1, tap key2, then release key1. For example, to press ctrl+esc hold down the ctrl key (usually with your pinkie), tap the esc key, then release the ctrl key. To press alt+f you hold down the alt key, tap the letter f, then release the alt key.

Tuesday, 8 May 2012

WHAT IS A COMPUTER?


A computer is an electronic device that manipulates information, or "data." it has the ability to store, retrieve, and process data. You can use a computer to type documents, send email, and browse the internet. You can also use it to handle spreadsheets, accounting, database management, presentations, games, and more.
Computers simplified

For beginning computer users, the computer aisles at an electronics store can be quite a mystery, not to mention overwhelming. However, computers really aren't that mysterious. All types of computers consist of two basic parts:
  • Hardware is any part of your computer that has a physical structure, such as the computer monitor or keyboard.
  • Software is any set of instructions that tells the hardware what to do. It is what guides the hardware and tells it how to accomplish each task. Some examples of software are web browsers, games, and word processors such as Microsoft word.
        a motherboard (hardware)











          


           Microsoft word (software)
Anything you buy for your computer can be classified as either hardware or software. Once you learn more about these items, computers are actually very straightforward.
The first electronic computer, the electronic numerical integrator and computer (eniac), was developed in 1946. It took up 1,800 square feet and weighed 30 tons.





What are the different types of computers?

When most people hear the word "computer" they think of a personal computer such as a desktop or laptop computer. However, computers come in many shapes and sizes, and they perform many different functions in our daily lives. When you withdraw cash from an ATM, scan groceries at the store, or use a calculator, you're using a type of computer.

              Desktop computers
a desktop computer
Many people use desktop computers at work, home, school, or the library. They can be small, medium, or large in style, and usually sit on a desk. Once you add a monitor, mouse, and a keyboard, you have what is typically known as a desktop computer.

 


Most desktop computers are easy to upgrade and expand, or add new parts. Another benefit of desktop computers is the cost. If you compare a desktop and a laptop with the same features, you will most likely find that the desktop computer is priced lower.
Some desktop computers have a built-in monitor to save space. These are often called all-in-one desktop computers.


                   Laptop computers


a laptop computer
The second type of computer that you may be familiar with is a laptop computer, or laptops as they are often referred to. Laptops are battery or ac-powered personal computers that are more portable than desktop computers, allowing you to use them almost anywhere.
Since a laptop is smaller than a desktop, it's more difficult to access the internal components. That means you may not be able to upgrade them as much as a desktop. However, it's usually possible to add more ram or a bigger hard drive.A laptop computer is sometimes called a notebook computer because of its size.

Servers

                         a server room

A server is a computer that "serves up" information to other computers on a network. Many businesses have file servers that employees can use to store and share files. A server can look like a regular desktop computer, or it can be much larger.
Servers also play an important role in making the internet work: they are where web pages are stored. When you use your browser to click a link, a web server delivers the page you requested.

Other types of computers
Today, there lots of everyday devices that are basically specialized computers, even though we don't always think of them as computers. Here are a few common examples:



the ipad, a type of tablet computer
  • Tablet computers: these use a touch-sensitive screen for typing and navigation. Since they don't require a keyboard or mouse, tablet computers are even more portable than laptops. The ipad is an example of a tablet computer.

  • Mobile phones: many mobile phones can do a lot of things a computer can do, such as browsing the internet or playing games. These phones are often called smartphones.

  • Game consoles: a game console is a specialized kind of computer that is used for playing video games. Although they are not as fully-featured as a desktop computer, many newer consoles, such as the Nintendo Wii, allow you to do non-gaming tasks like browsing the internet.
  • TVs: many TVs now include applications (or apps) that let you access various types of online content. For example, you can view your Facebook news feed or watch streaming movies on Netflix.

PCs and macs
Personal computers come in two main "styles": PC and mac. Both styles are fully functional, but they do have a different look and feel, and many people prefer one or the other.



                               a PC
                               a mac
  • PC: this type of computer began with the original IBM PC that was introduced in 1981. Other companies began to create similar computers, which were called IBM PC compatible (often shortened to PC). Today, this is the most common type of personal computer, and it typically includes the Microsoft windows operating system.

  • Mac: the Macintosh computer was introduced in 1984, and it was the first widely sold personal computer with a graphical user interface, or GUI (pronounced gooey). All macs are made by one company, apple inc., and they almost always use the mac OS x operating system.
Although PC can refer to an IBM PC compatible, the term can also be used to refer to any personal computer, including macs.


About this tutorial

In this tutorial, we'll mostly be focusing on PCs and the windows operating system. If you're using a mac, you may notice some differences with the way that your computer works. However, much of the information in this tutorial will still apply, no matter what kind of computer you're using.