Instead, if you ask the system to check your hard disk for errors from within Windows, it asks that you schedule the test for the next time the computer is rebooted.. Be aware that the l
Trang 1If you think about it, it would be rather difficult to check the organization and the physical attributes of your hard disk while it was operating — kind
of like trying to gauge the depth and quality of the water in a shallow pond at the same time as a speedboat passes by There are just too many moving parts and the mere presence of the boat (or the activities of Windows) changes the environment too much for the test to get an accurate reading Instead, if you ask the system to check your hard disk for errors from within Windows, it asks that you schedule the test for the next time the computer is rebooted And then the full test is run from outside Windows; although MS-DOS no longer exists like it did when it was the operating system for early PCs, there is a functional equivalent that underlies even the most current of GUIs, Windows Vista
Be aware that the larger your hard disk drive and the more files recorded on
it, the longer the CHKDSK process can take On my Toshiba Satellite P205 test machine, a test (with the repair function turned on) required more than two hours to complete, and I couldn’t use the laptop for any other purpose during that time If you need to use your laptop, consider scheduling a test, rebooting your machine at the end of the day, and leaving it running all night
Selecting a testing level
Do you want a relatively quick checkup, or do you want your computer doctor to perform a detailed diagnosis and test and then reach in and per-form any necessary surgery? The checkup is the least disruptive, but nothing
Figure 3-8:
In My Computer or Computer, right-click the listing for your hard disk to display its Properties window;
choose the Tools tab to conduct error checking or defrag-mentation
Trang 2Book III Chapter 3
gets fixed: All you get is a report If the tests show nothing is wrong, you’ll have saved a great deal of time
Depending on which version of Windows you have, you may be offered the option to merely scan your system for problems All current versions go on
to allow automatic fixes of file systems errors and bad sectors Use the pointer to turn on the check box next to your choice:
✦ Scan If you select no options, the system will examine the hard disk for
logical and certain physical problems and give you a report
✦ Automatically fix file system errors The utility will examine all of the files,
folders, and indexes on the disk and repair most basic problems it finds
✦ Scan for and attempt recovery of bad sectors The utility will check out
the magnetic markings on the surface of the disk that demark sectors in search of any corrupted, incorrect, or damaged indicators If possible, the utility will repair the sector marking If the portion of the disk itself is damaged, the utility may be able to place an electronic fence around the sector so that the system does not attempt to place new information there
✦ To check for and repair both file errors and bad sectors, select the check box next to both available options
If you choose to run error checking, remember my explanation about how the system can’t examine itself while the drive is in use As you can see in Figure 3-9, you’re asked if you want the machine to give itself a checkup the next time you turn it on — and before it loads Windows
A sector is a slide of one of the circular tracks on a magnetic disk or optical
disc Each sector is intended to hold a particular amount of data Under Windows, most sectors hold 512 bytes on a magnetic medium
Managing Your Disk Drives
Be good to your hard disks and they won’t die an early death With mechanical devices — basically anything with a motor or a moving part —
failure is only a question of when, not if.
It starts before you even take possession of your laptop Brand-name laptops generally use better-quality components
One way to measure the manufacturer’s intentions is to look at the length of the warranty A new machine with a 90-day warranty would scare me; the way I figure it, a company hopes to never have to pay for repairs A longer warranty is one indication that they believe their machine—including its built-in hard disk drive—will stand a medium-to-long test of time
Trang 3If you purchase a no-name or store-brand laptop, find out the maker of the hard disk drive within There aren’t that many backwoods disk-drive suppli-ers for current machines, but be wary if you don’t recognize the name of the manufacturer
Once the laptop is in your possession, you have several ways to find out the maker of the hard disk drive, and each of them is also the pathway to proper maintenance Here’s how to learn about your drive:
1.Click My Computer.
2.Highlight the drive you want to investigate
3.Right-click the drive label
4.Choose Properties
Back in Figure 3-5 you see the properties information about the Toshiba-brand hard drive in this book’s sample Toshiba Satellite P205 laptop; that’s not a surprise since that company is one of the pioneers of the laptop industry and its drives are among the most reliable
The Computer (under Windows Vista) or My Computer (Windows XP) screen shows you the automatically generated name for the hard drive
in your laptop as well as the drive letter assigned to it
Figure 3-9:
You can schedule an error-checking session to run the next time you start your machine
Trang 4Book III Chapter 3
Avoid reassigning the drive letter for the first disk drive in your machine; the laptop seeks out this device to boot the system and it’s where Windows and many other programs expect to reside It’s possible
to give it a different drive letter, but the potential for headache is more than I am willing to willingly accept
5.Get a quick measurement of the total capacity of the drive
6.See how much of that space is still available for storage
See Figure 3-10
7.Go to the General tab
8.See the file system that is in use
Modern machines almost all use NTFS, while antiques (and certain external devices) may be based on the less-capable, sometimes incom-patible FAT32 or FAT technology
If you subdivided your physical hard disk so it includes one or more
logi-cal drives, each of them is shown separately The logilogi-cal drives are
treated as if they were separate pieces of plastic, metal, and motors
The capacity report on the hard disk drive shown in Figure 3-10 gives a great example of creative computing mathematics The capacity is listed as 198,475,509,760 bytes, which is more or less the raw number of recordable computer words; alongside is a figure of 184GB, which is an estimate of its actual usable space when overhead and other factors are included If you add up the numbers listed for used space and free space, you come up with yet another number, 184.7GB, which tells you how much your particular blend of data actually occupies on the disk And the specifications for the laptop when you shop for it at the store? The hard drive’s size is rounded up
by the marketing department to an even 200GB
Why subdivide a large hard disk with logical drives? It’s all a matter of personal organizational tendencies; I like to put things into separate boxes
If I have two drives in a laptop or desktop machine
✦ I usually reserve the C drive for the operating system, programs, and my current data files
✦ On the second drive I usually make two logical disks:
• One to hold backup copies of current data files
• One as repository for my back pages, archives of older work And then I make backups of both current and archival material onto an external hard drive and onto DVDs
Trang 5By the way, the first drive in a system is marked as location 0 and the second at location 1 (A third drive, if one is present, would be at location 2, and so on.) Computer designers still hold on to bits and pieces (oops, a geekish pun) of the binary system in labels and other elements of the machines they design Since binary math starts with 0, so does the numbering of the various con-nectors and pins inside your computer So your first hard disk drive is to the computer drive 0, and to Windows drive C, and to you whatever you choose
to call it
Keeping a clean drive
In the world of computers, it’s not the content that matters so much as its orderliness on the disk And then there’s the matter of taking out the trash Let’s talk trash first There’s an awful lot of it on any laptop computer that has been in use for a while
✦ Web junk If you use the Internet, web pages are constantly sending you
images, icons, and other stuff to display on your screen; many of those
elements are written to your hard disk as temporary files so they can be
Figure 3-10:
The General tab of the Properties report for the internal hard drive is
a reality check: you can see the total capacity of the drive as well as the amount of space that
is in use
Note the Disk Cleanup button near the pie chart
Trang 6Book III Chapter 3
more quickly shown if you return to a particular page In theory, those temporary files are supposed to be deleted when you close your browser; in practice, well, not all are
✦ Updated garbage Then there are programs and drivers and updates that
are downloaded to your machine to keep it up to date; if you’re running a proper security or antivirus program, these are only accepted with your permission Again, the installation packages for these files are supposed
to be removed once the programs they deliver are put in place; not all are
✦ Refuse refusal There is real trash, too, although on a computer things
thrown away sometimes hang around for a long time before they go away
Say you press the Delete key to remove a file you no longer need You’d think that meant the file was physically erased from the magnetic surface
of your disk, but that’s not the case
First of all, for simplicity and speed, when you “delete” a file, all that actually happens is that its name is removed from the directory of available files that
is maintained by the computer It’s even simpler than that: The first charac-ter of its name is changed from a standard alphanumeric symbol to one of the characters that the computer has reserved for its own purpose The file
is still there, only the system ignores it when you look at a directory of files
For most users, this is a good thing; I’d say, on average, I accidentally delete
a file about once a year And, also on average, every few months I change my mind about a file I deleted and wish I could get it back
Windows, as well as third-party add-on utilities, offers you a way to
“undelete” a file from the Recycle Bin (Cute name, don’t you think? In early operating systems it was called the trash basket, but now it has a more ecofriendly name and it also hints at the fact that the stuff it holds may be pulled back out and put to use again.) A stylized icon for the Recycle Bin is shown in Figure 3-11
Files stay in the recycle bin for hours, days, weeks, or even months until one
of the following events occurs:
✦ Right-click the recycle bin icon on the desktop and select Open Once the contents of the bin are displayed onscreen, right-click a specific file and choose Delete, which gets rid of that specific file
✦ Right-click the recycle bin icon on the desktop and select Empty Recycle Bin, which dumps all files
Trang 7✦ Your recycle bin becomes so clogged up with deleted files that it auto-matically starts throwing away the least recently deleted files to make room for fresher garbage (If you right-click the recycle bin icon and choose Properties, you can set the maximum amount of space you want
to allow the bin to set aside The more space you devote to it, the longer
it takes before files are removed from the bin.)
Oh, and even if you do delete a file from the recycle bin, it still doesn’t mean
it is gone forever It is only unavailable to ordinary users once the system actually writes new data over the location it once called home That may happen immediately, or it may take quite a while
Retrieving erased files
As long as a file is still listed as being in the recycle bin, you can remove it from the can and return it to its prior location
One word of warning: If you’ve deleted a file — or if a program has automati-cally deleted an older version of a file and resaved a current copy under the same name — be careful not to overwrite a newer version with an older one
Figure 3-11:
The Recycle Bin icon fills
up with images of crumpled paper as you send files its way
When you empty the bin, the trash disappears
to the accompan-iment of a neat little sound of rustling paper
Trang 8Book III Chapter 3
If you find yourself in that situation, before you recover a file from the recy-cle bin, rename the newer version by adding a date, number, or some other indication that it varies from the older file A recycle bin stuffed with deleted files is shown in Figure 3-12
To restore a file, do this:
1.Double-click the Recycle Bin icon on the desktop.
2.Right-click an individual file.
3.Click Restore.
Or, you can restore all the files in the recycle bin by clicking the Restore All Items button
Unerasing erased files You can purchase third-party utilities that can “unerase” files that have been removed from the recycle bin but not overwritten This is a bit of a last-ditch rescue effort, and you may find that not all the file is available to you
(because the file had been fragmented)
Figure 3-12:
You can undelete an individual file, restore all deleted files, or empty the trash from the Recycle Bin screen
Trang 9One more thing: Law enforcement and spy agencies and some computer techies may be able to recover some or all files that have been deleted, removed from the recycle bin, and written over They use super-sensitive scanning tools that can sometimes see the magnetic shadows of erased 0s and 1s on the disk
Finally, there are fragments I discuss how files get fragmented and how to defragment them in the next section; here, though, I’m talking about dis-carded partial files that once were part of a larger file or that have been left behind as files were revised or updated You can also end up with fragments when a file is deleted and its space returned to available inventory on the disk; the computer may overwrite the first, third, and fifth piece of the file because they’re closest to each other or to the location of the read-write head, leaving the second and fourth piece of the file as orphaned fragments
Adjusting recycle bin settings Windows includes a number of options that allow you to customize the way the recycle bin works One of the most important: setting the maximize amount of space devoted to the bin
If you’re not in the habit of regularly clearing your computer’s Recycle Bin,
or if you have a lot of extra space, consider setting up a large amount of space for its use
Think of the size of the electronic bin as being roughly equivalent to the size
of the real trash can beneath your desk The larger the bin, the less often it has to be emptied In the case of the computer’s recycle bin, when the can reaches capacity, it starts permanent deletion of items from the bottom In
business inventory management this is referred to as FIFO, first-in first-out In
other words, the files that have been in the bin the longest are disposed of before more recent additions Very large files aren’t sent to the recycle bin, since they would otherwise displace a great many smaller files
Other options — not ones I necessarily recommend — include these:
✦ Turning off the sometimes annoying message that asks if you really, really want to delete a file It’s supposed to make you stop and think, and
it just might save you from heartache one day
✦ Instruct the system to bypass the recycle bin and just remove files from your hard drive when you delete them Again, I’d rather have the protec-tive net of the bin
Trang 10Book III Chapter 3
To change the Recycle Bin settings, do this:
1.Right-click the bin’s icon on the desktop
2.Click Properties
3.Click the General tab
4.Select from the available customization options.
Your hard disk’s fragmented mind
A fragmented file is split into two or more pieces that aren’t next to each
other on your hard disk drive In fact, files are commonly split up so the beginning is somewhere in the middle and the end comes before the middle
Why do files become fragmented, and why should you care? In the spirit of fragmentation, I answer the second question first
You should care because a disk that has files split up and spread hither and yon around its platters will operate less efficiently than one where everything is neat and orderly
Here’s how files get fragmented: Consider that fact that not every file is the same length You may write a short note to yourself — a shopping list, or
a to-do list, for example Or you might just not have all that much to say on a particular subject But depending on the size of your hard disk drive and the filing system it uses, your hard disk drive will have a minimum size for the block of space it allocates for a file; say it’s 64KB
If your file is only 1KB in length, it will sit within a 64KB section like the last remaining truffle in a beautifully packaged 64-pound box of chocolates And
if your file happens to be 65KB, it occupies one complete 64KB section plus 1KB in an otherwise empty container
When you start a file the operating system opens a section of the disk for it and fills it up, but when it reaches the end of the first segment the next avail-able space may or may not be directly next door The next block of 0s and 1s may be all the way across the disk, on the other side of the same platter, or even on a different platter within the hard drive
Then consider what happens the next time you open that file to do some editing or add more material While the original file might have occupied a pair of contiguous segments, other work you have begun, copied, or edited may have since filled in segments all around it