Sideway BICK BlogSideway BICK BLOG from Sideway

A Sideway to Sideway Home

Link:http://output.to/sideway/default.asp?qno=110700133

BUFFERS

MS DOS Command: BUFFERS

Reference from Microsoft MS-DOS cmd help

Description

Allocates memory for a specified number of disk buffers when your system starts. You can use this command only in your CONFIG.SYS file.

Syntax

BUFFERS=n[,m]

Parameters

n Specifies the number of disk buffers. The value of n must be in the range 1 through 99.
m Specifies the number of buffers in the secondary buffer cache. The value of m must be in the range 0 through 8.

Default settings

The default setting for the number of disk buffers depends on the configuration of your system, as shown in the following table:

Configuration Buffers (n) Bytes
<128K of RAM, 360K disk 2 --
<128K of RAM, > 360K disk 3 --
128K to 255K of RAM 5 2672
256K to 511K of RAM 10 5328
512K to 640K of RAM 15 7984

The default setting for the number of buffers in the secondary cache (m) is 0 (no secondary cache buffers).

If you specify an invalid value for n or m, BUFFERS uses the default setting of no secondary cache buffers.

Remarks

Using BUFFERS with DriveSpace

If you are using SMARTDrive with DriveSpace and MS-DOS is loaded into the HMA, set BUFFERS=10. This ensures that there will be enough room in the HMA for MS-DOS, DriveSpace, and all your buffers. (If BUFFERS is set to a value higher than 10, there might not be enough room in the HMA for all your buffers, and MS-DOS will place all the buffers into conventional memory.) If you're using SMARTDrive, specifying more than 10 buffers will not speed up your system much, but will use additional memory.

Using BUFFERS with SMARTDRV.EXE

If you are using SMARTDRV.EXE, either use a smaller value for BUFFERS, or do not specify a BUFFERS command at all.

How MS-DOS uses buffers

MS-DOS uses the memory reserved for each disk buffer to hold data during read and write operations. To achieve the best performance with programs such as word processors, specify a value between 10 and 20 for n. If you plan to create many subdirectories, you might want to increase the number of buffers to 20 or 30. Each buffer requires approximately 532 bytes of memory. Therefore, the more buffers you have, the less memory you have available for programs. (To find out how much memory MS-DOS is using for disk buffers, use the MEM /D /P command.)

If MS-DOS is loaded in the high memory area (HMA) and there is enough room in the HMA to contain all the buffers, MS-DOS also places the buffers in the HMA. If you specify more than 48 buffers, or if you upgraded from MS-DOS 6.2, are running DriveSpace, and specify more than 10 buffers, there might not be enough room in the HMA for all the buffers. In that case, MS-DOS places all of the buffers into conventional memory.

Using the secondary buffer cache

Using the cache can speed up certain disk operations if you are using a computer with an 8086 processor. If you are using a computer with a faster processor, it is better to use SMARTDRV for a cache.

Examples

To create 20 disk buffers, include the following command in your CONFIG.SYS file:

buffers=20

Link:http://output.to/sideway/default.asp?qno=110700139

CHKDSK

MS DOS Command: CHKDSK

Reference from Microsoft MS-DOS cmd help

Description

Checks the status of a disk and displays a status report. Can also fix disk errors.

The status report shows errors found in the MS-DOS filing system, which consists of the file allocation table and directories. CHKDSK also displays a summary of disk usage. (CHKDSK does not verify that the information in your files can be accurately read.) If errors exist on the disk, CHKDSK alerts you with a message.

Note: The ScanDisk program is the preferred method of fixing drive problems, and should be used instead of the CHKDSK /F command. For more information, see the SCANDISK command.

Syntax

CHKDSK [drive:][[path]filename] [/F] [/V]

To display the status of the disk in the current drive, use the following syntax:

CHKDSK

Parameters

drive: Specifies the drive that contains the disk that you want CHKDSK to check.
[path]filename Specifies the location and name of a file or set of files that you want CHKDSK to check for fragmentation. You can use wildcards (* and ?) to specify multiple files.

Switches

/F Fixes errors on the disk. Do not use this option when running CHKDSK from other programs; for more information, see "Using CHKDSK With Open Files" in CHKDSK--Notes. In general, when fixing disk errors, use ScanDisk instead of CHKDSK.
/V Displays the name of each file in every directory as the disk is checked.

Remarks

Format of status reports

MS-DOS displays CHKDSK status reports similar to the following example:

Volume Serial Number is B1AF-AFBF

 

72,214,528 bytes total disk space

73,728 bytes in 3 hidden files

30,720 bytes in 12 directories

11,493,376 bytes in 386 user files

61,440 bytes in bad sectors

6,055,264 bytes available on disk

 

2,048 bytes in each allocation unit

35,261 total allocation units on disk

29,568 available allocation units on disk

 

655,360 total bytes memory

493,456 bytes free

Using BUFFERS with SMARTDRV.EXE

If you are using SMARTDRV.EXE, either use a smaller value for BUFFERS, or do not specify a BUFFERS command at all.

Fixing disk errors

The ScanDisk program is the preferred method of fixing disk errors. For more information, see the SCANDISK command.

If you want to use CHKDSK to fix disk errors, use the /F switch. (CHKDSK corrects disk errors only if you specify the /F switch.) CHKDSK /F displays a prompt similar to the following:.

10 lost allocation units found in 3 chains.

Convert lost chains to files?

If you press Y, MS-DOS saves each lost chain in the root directory as a file with a name in the format FILEnnnn.CHK. When CHKDSK finishes, you can examine these files to see if they contain any data you need. If you press N, MS-DOS fixes the disk but does not save the contents of the lost allocation units.

If you do not use the /F switch, CHKDSK alerts you with a message if a file needs to be fixed but does not fix the error(s).

Using CHKDSK with open files

Never use CHKDSK when files are currently open. CHKDSK is designed for use when the files on the disk are in an unchanging state -- that is, when they are not open. When a file is open, it is probably changing, and MS-DOS will update the file allocation table and the directory structure to reflect changes. Such updates are not always made immediately, and updates to the file allocation table and the directories occur at different times. If you run CHKDSK when files are open on the disk, it interprets differences between the directory structure and the file allocation tables as errors. Running CHKDSK /F when files are open can result in corruption or loss of data. Therefore, never run CHKDSK /F from another program, or when Microsoft Windows or the MS-DOS Task Swapper is running.

Using CHKDSK with assigned drives and networks

The CHKDSK command does not work on drives formed by the SUBST command. You cannot use CHKDSK to check a disk on a network drive.

Physical disk errors

The CHKDSK command finds only logical errors in the file system, not physical disk errors. To identify and repair physical disk errors, use the ScanDisk program. For more information, see the SCANDISK command.

Bad disk sectors

Bad sectors reported by CHKDSK were marked as "bad" when your disk was first prepared for operation. ScanDisk and other physical disk-error correction utilities can also mark sectors as "bad." Bad sectors pose no danger.

Cross-Linked Files

CHKDSK reports a cross-linked file if two files or directories are recorded as using the same disk space. If CHKDSK finds a cross-linked file, it displays a message similar to the following:

File is cross linked on allocation unit number

Some of the information in these files or directories has been lost.

CHKDSK will not fix a cross-linked file, even if you specify the /F switch. To correct a cross-linked file, run ScanDisk. Or, to fix them manually, copy the specified files or directories elsewhere and delete the originals.

ERRORLEVEL parameters

If CHKDSK does not find any errors, it returns an ERRORLEVEL value of 0. If CHKDSK found one or more errors, it returns an ERRORLEVEL value of 255.

Saving a CHKDSK status report to a file

You can save a CHKDSK status report by redirecting the output to a file. Do not use the /F switch when you redirect CHKDSK output to a file.

Examples

To find out how much data is stored on drive C and how much space is still free, and to check the disk for errors, type the following command:

chkdsk c:

CHKDSK pauses and displays messages if it encounters errors.

To redirect the output of CHKDSK to a file named STATUS, type the following command:

chkdsk a: > status

Because the output is redirected, MS-DOS does not repair errors it encounters during the check; but it records all the errors in a report file. Afterward, you can use CHKDSK with the /F switch without redirection to correct any errors noted in the status report.

Link:http://output.to/sideway/default.asp?qno=110700138

CHDIR

MS DOS Command: CD (CHDIR)

Reference from Microsoft MS-DOS cmd help

Description

Displays the name of the current directory or changes the current directory.

Syntax

CD [drive:][path]

CD[..]

CHDIR [drive:][path]

CHDIR[..]

To display the current drive letter and directory name, use either of the following syntax lines:

CD

CHDIR

Parameters

[drive:][path] Specifies the drive (if other than the current drive) and directory to which you want to change.
.. Specifies that you want to change to the parent directory.

Remarks

Changing to the root directory

The root directory is the top of the directory hierarchy for a drive. To return to the root directory, type the following command:

cd \

Using the current directory from a different drive

If you are working in the \PUBLIC\JONES directory on drive C and you change to drive D, you can copy files to and from the \PUBLIC\JONES directory by specifying only the drive letter C.

Changing the directory on another drive

You can change the current directory on another drive by specifying the drive letter on the command line when you use CHDIR or CD.

Examples

Either of the following commands changes your current directory to the directory named PRIMETIM:

chdir \primetim

cd \primetim

Suppose you have a directory named SPECIALS with a subdirectory named SPONSORS. To change your current directory to \SPECIALS\SPONSORS, type the following command:

cd \specials\sponsors

Or, if your current directory is \SPECIALS, you can use the following command to change to the \SPECIALS\SPONSORS directory:

cd sponsors

To change from a subdirectory back to the parent directory, type the following command:

cd..

To display the name of the current directory, you can use CHDIR or CD without a parameter. For example, if your current directory is \PUBLIC\JONES on the disk in drive B, type CHDIR to see the following response:

B:\PUBLIC\JONES

If you are working on drive D and you want to copy all files in the \PUBLIC\JONES and \PUBLIC\LEWIS directories on drive C to the root directory on drive D, type the following commands:

chdir c:\public\jones

copy c:*.* d:\

chdir c:\public\lewis

copy c:*.* d:\

If, instead, you want to copy all files in the \PUBLIC\JONES and \PUBLIC\LEWIS directories to your current location on drive D, type the following commands:

chdir c:\public\jones

copy c:*.* d:

chdir c:\public\lewis

copy c:*.* d:

For more information on copying files, see the COPY command.

Previous Month  JUL  2011  Next Month
SMTWTFS
12
3456789
10111213141516
17181920212223
24252627282930
31

Previous Month  JUL  2014  Next Month
SMTWTFS
12345
6789101112
13141516171819
20212223242526
2728293031

Sideway BICK Blog

21/07


Copyright © 2000-2020 Sideway . All rights reserved Disclaimerslast modified on 26 January 2013