ALL IP COMMAND
This first command isn't really an "internal" command at all. It describes all the switches that can be used when executing the COMMAND.COM program itself (and secondary copies):
command COMMAND.COM
-------
Starts a new copy of the Windows Command Interpreter.
COMMAND [[drive:]path] [device] [/E:nnnnn] [/L:nnnn] [/U:nnn] [/P] [/MSG]
[/LOW] [/Y [/[C|K] command]]
[drive:]path Specifies the directory containing COMMAND.COM.
device Specifies the device to use for command input and output.
/E:nnnnn Sets the initial environment size to nnnnn bytes.
(nnnnn should be between 256 and 32,768).
/L:nnnn Specifies internal buffers length (requires /P as well).
(nnnn should be between 128 and 1,024).
/U:nnn Specifies the input buffer length (requires /P as well).
(nnn should be between 128 and 255).
/P Makes the new Command Interpreter permanent (can't exit).
/MSG Stores all error messages in memory (requires /P as well).
/LOW Forces COMMAND to keep its resident data in low memory.
/Y Steps through the batch program specified by /C or /K.
/C command Executes the specified command and returns.
/K command Executes the specified command and continues running.
Back to TOC
cd Change Directory
-------
Displays the name of or changes the current directory.
CHDIR [drive:][path]
CHDIR[..]
CD [drive:][path]
CD[..]
.. Specifies that you want to change to the parent directory (in
other words: Move up one folder in the directory tree). DOS 7,
WHEN using a DOS-window, allows you to use extra dots here! If
you were in C:\WINDOWS\SYSTEM\shellext, you could enter cd...
to go up to C:\WINDOWS or even cd.... to get to the root.
Type CD drive: to display the current directory in the specified drive.
Type CD without parameters to display the current drive and directory.
Back to TOC
chcp Change Code Page
-------
Displays or sets the active code page number.
CHCP [nnn]
nnn Specifies a code page number.
Type CHCP without a parameter to display the active code page number.
Back to TOC
cls Clear Screen
-------
Clears the screen.
CLS
Back to TOC
________________________________________
copy Copy or Concatenate Files
-------
Copies one or more files to another location.
COPY [/A | /B] source [/A | /B] [+ source [/A | /B] [+ ...]] [destination
[/A | /B]] [/V] [/Y | /-Y]
source Specifies the file or files to be copied.
/A Indicates an ASCII text file.
/B Indicates a binary file.
destination Specifies the directory and/or filename for the new file(s).
/V Verifies that new files are written correctly.
/Y Suppresses prompting to confirm you want to overwrite an
existing destination file.
/-Y Causes prompting to confirm you want to overwrite an
existing destination file.
The switch /Y may be preset in the COPYCMD environment variable.
This may be overridden with /-Y on the command line
To append files, specify a single file for destination, but multiple files
for source (using wildcards or file1+file2+file3 format).
Note this special case of the COPY command:
copy con output.txt Copy from Console to ...
After you type this command and press ENTER, MS-DOS copies everything you
type to the file OUTPUT.TXT. When you are finished typing, press CTRL+Z to
indicate that you want to end the file. The Control-Z character will
appear on the screen as " ^Z ". You can also end a COPY CON command by
pressing the F6 key. Pressing F6 also generates the Control-Z character;
a " ^Z " still appears on the screen.
The following example copies information from the keyboard to a printer
connected to LPT1:
copy con lpt1
Back to TOC
________________________________________
ctty Change Termial Type
-------
Changes the terminal device used to control your system.
CTTY device
device The terminal device you want to use, such as COM1.
Back to TOC
date
-------
Displays or sets the date.
DATE [date]
Type DATE without parameters to display the current date setting and
a prompt for a new one. Press ENTER to keep the same date.
Back to TOC
________________________________________
del Delete (Erase) Files
-------
Deletes one or more files.
DEL [drive:][path]filename [/P]
ERASE [drive:][path]filename [/P]
[drive:][path]filename Specifies the file(s) to delete. Specify
multiple files by using wildcards.
/P Prompts for confirmation before deleting each file.
Note: In most cases the file is NOT actually "erased"; the space it used
is simply noted as being available for new files to write over it. If you
really want to erase every word of a sensitive file, you should get a
'security program' designed to overwrite all erased files!
Back to TOC
________________________________________
dir Directory Listing
-------
Displays a list of files and subdirectories in a directory.
DIR [drive:][path][filename] [/P] [/W] [/A[[:]attributes]]
[/O[[:]sortorder]] [/S] [/B] [/L] [/V]
[drive:][path][filename]
Specifies drive, directory, and/or files to list.
(Could be enhanced file specification or multiple filespecs.)
/P Pauses after each screenful of information.
/W Uses wide list format.
/A Displays files with specified attributes.
attributes D Directories R Read-only files
H Hidden files A Files ready for archiving
S System files - Prefix meaning not
/O List by files in sorted order.
sortorder
N By name (alphabetic)
S By size (smallest first)
E By extension (alphabetic)
D By date & time (earliest first)
G Group directories first
- Prefix to reverse order
A By Last Access Date (earliest first)
/S Displays files in specified directory and all subdirectories.
/B Uses bare format (no heading information or summary).
/L Uses lowercase.
/V Verbose mode.
Switches may be preset in the DIRCMD environment variable. Override
preset switches by prefixing any switch with - (hyphen)--for example, /-W.
Back to TOC
________________________________________
exit
-------
Quits the COMMAND.COM program (command interpreter).
EXIT
If you're in a DOS-Window in Windows, this will close the window!
Back to TOC
________________________________________
lock
-------
Locks a drive, enabling direct disk access for an application.
LOCK [drive:]
Note: If you use this command in a DOS-Window, it will only affect the
floppy disk drives; Windows™ 95/98 does not allow you to lock a drive
directly while it is operating. If you try lock C: , you'll get the error
message: " Locking operation failed."
Back to TOC
________________________________________
md Make Directory
-------
Creates a directory.
MKDIR [drive:]path
MD [drive:]path
Back to TOC
________________________________________
path
-------
Displays or sets a search path for executable files.
PATH [[drive:]path[;...]]
PATH ;
Type PATH (without any parameters) to display the current path.
Type PATH ; (PATH space semi-colon) to CLEAR all search-path settings;
this means that DOS will only be able search the current
directory.
NOTE: When used in a DOS-Window, these commands ONLY apply to
that particular DOS-Window! (The PATH will not be changed globally.)
See the SET command for a similar effect in DOS-Windows, and also
for a utility (W95envar.zip) that will make global changes!
Back to TOC
________________________________________
prompt
-------
Changes the Windows command prompt.
PROMPT [text]
text Specifies a new command prompt.
Prompt can be made up of normal characters and the following special codes:
$Q = (equal sign)
$$ $ (dollar sign)
$T Current time
$D Current date
$P Current drive and path
$V Windows version number
$N Current drive
$G > (greater-than sign)
$L < (less-than sign)
$B | (pipe)
$H Backspace (erases previous character)
$E Escape code (ASCII code 27)
$_ Carriage return and linefeed
Type PROMPT without parameters to reset the prompt to the default setting.
Back to TOC
________________________________________
rd Remove (Delete) Directory
-------
Removes (deletes) a directory.
RMDIR [drive:]path
RD [drive:]path
Back to TOC
ren Rename File or Directory
-------
Renames a file/directory or files/directories.
RENAME [drive:][path][directoryname1 | filename1] [dirname2 | filename2]
REN [drive:][path][directoryname1 | filename1] [dirname2 | filename2]
Note that you cannot specify a new drive or path for your destination.
Back to TOC
________________________________________
set
-------
Displays, sets, or removes Windows environment variables.
SET [variable=[string]]
variable Specifies the environment-variable name.
string Specifies a series of characters to assign to the variable.
Type SET without parameters to display the current environment variables.
Note: If you use SET in a DOS-Window to add a variable and string, it
will only affect commands run in that particular window! Unlinke Win NT
(which has a DOS 'Environment' Tab), Windows™ 95/98 normally will
not allow you to set global Environment strings while the OS is running:
You have to set them in AUTOEXEC.BAT and reboot the system!
However, I recently found that Microsoft made a utility for setting
Environment strings from a DOS-window with a 'global' effect... this
utility is called WINSET.EXE ( it's archived with another util called
SHORTCUT.EXE and labeled as W95ENVARS.EXE ). You can download
this now as: W95envar.zip.
Back to TOC
________________________________________
time
-------
Displays or sets the system time.
TIME [time]
Type TIME with no parameters to display the current time setting and a
prompt for a new one. Press ENTER to keep the same time.
Back to TOC
________________________________________
type
-------
Displays the contents of text files.
TYPE [drive:][path]filename
NOTE: If there are more than 25 lines in the file, you'll need to pipe
the screen output through the DOS External Command MORE in order
to keep all but the last screen from flashing past you! EXAMPLE:
C:\>type tips.txt |more
Back to TOC
________________________________________
unlock
-------
Unlocks a drive, disabling direct disk access for an application.
UNLOCK [drive:] See LOCK
Back to TOC
ver Version
-------
Displays the Windows version.
VER
Back to TOC
vol Volume Label/SN
-------
Displays the disk volume label and serial number, if they exist.
VOL [drive:]
Note: The DOS command to change a Volume Label is an "External Command"
(the program is: LABEL.EXE).
Back to TOC
________________________________________
The following commands are rarely used outside of a BATCH file (such as AUTOEXEC.BAT):
break
-------
Sets or clears extended CTRL+C checking.
BREAK [ON | OFF]
Type BREAK without a parameter to display the current BREAK setting.
Back to TOC
call
-------
Calls one batch program from another.
CALL [drive:][path]filename [batch-parameters]
batch-parameters Specifies any command-line information required by
the batch program.
Back to TOC
echo
-------
Displays messages, or turns command-echoing on or off.
ECHO [ON | OFF]
ECHO [message]
Type ECHO without parameters to display the current echo setting.
Back to TOC
for
-------
Runs a specified command for each file in a set of files.
FOR %variable IN (set) DO command [command-parameters]
%variable Specifies a replaceable parameter.
(set) Specifies a set of one or more files. Wildcards may be used.
command Specifies the command to carry out for each file.
command-parameters
Specifies parameters or switches for the specified command.
To use the FOR command in a batch program, specify %%variable instead of
%variable.
Back to TOC
goto
-------
Directs Windows to a labelled line in a batch program.
GOTO label
label Specifies a text string used in the batch program as a label.
You type a label on a line by itself, beginning with a colon.
Example:
The following batch program formats a disk in drive A as a system disk. If
the operation is successful, the GOTO command simply directs MS-DOS to the
label named "end"; if not, an error message is displayed:
echo off
format a: /s
if not errorlevel 1 goto end
echo An error occurred during formatting.
:end
echo Successfully formatted the disk in drive A.
Back to TOC
if
-------
Performs conditional processing in batch programs.
IF [NOT] ERRORLEVEL number command
IF [NOT] string1==string2 command
IF [NOT] EXIST filename command
NOT Specifies that Windows should carry out the command only
if the condition is false.
ERRORLEVEL number Specifies a true condition if the last program run
returned an exit code equal to or greater than the
number specified.
command Specifies the command to carry out if the condition is
met.
string1==string2 Specifies a true condition if the specified text strings
match.
EXIST filename Specifies a true condition if the specified filename
exists.
Note: Although you can only check directly for the existence of a file, you can
also check for directories (folders) by using the NUL operator as a filename.
Example:
if exist C:\TEMP\NUL goto done will route program flow to
the label "done" only if the folder C:\TEMP exists!
Back to TOC
lfnfor Long File Name FOR
-------
Enables/Disables Long file names when processing FOR commands.
LFNFOR [ON | OFF]
Type LFNFOR without a parameter to display the current setting.
Back to TOC
lh Load High
-------
Loads a program into the upper memory area.
LH [drive:][path]filename [parameters]
LOADHIGH [drive:][path]filename [parameters]
LOADHIGH [/L:region1[,minsize1][;region2[,minsize2]...] [/S]]
[drive:][path]filename [parameters]
/L:region1[,minsize1][;region2[,minsize2]]...
Specifies the region(s) of memory into which to load
the program. Region1 specifies the number of the first
memory region; minsize1 specifies the minimum size, if
any, for region1. Region2 and minsize2 specify the
number and minimum size of the second region, if any.
You can specify as many regions as you want.
/S Shrinks a UMB to its minimum size while the program
is loading.
[drive:][path]filename
Specifies the location and name of the program.
Back to TOC
pause
-------
Suspends processing of a batch program and displays the message:
Press any key to continue....
PAUSE
Back to TOC
rem
-------
Records comments (remarks) in a batch file or CONFIG.SYS.
REM [comment]
Back to TOC
shift
-------
Changes the position of replaceable parameters in a batch file.
SHIFT
Back to TOC
verify
-------
Tells Windows whether to verify that your files are written correctly to a
disk.
VERIFY [ON | OFF]
Type VERIFY without a parameter to display the current VERIFY setting.
Back to TOC
attrib.exe (File) Attributes
--------
Displays or changes file attributes.
ATTRIB
[+R | -R] [+A | -A] [+S | -S] [+H | -H] [[drive:][path]filename] [/S]
+ Sets an attribute.
- Clears an attribute.
R Read-only file attribute.
A Archive file attribute.
S System file attribute.
H Hidden file attribute.
/S Processes files in all directories in the specified path.
Back to TOC
choice.com (Used in BATCH files)
--------
Waits for the user to choose one of a set of choices.
CHOICE [/C[:]choices] [/N] [/S] [/T[:]c,nn] [text]
/C[:]choices Specifies allowable keys. Default is YN
/N Do not display choices and ? at end of prompt string.
/S Treat choice keys as case sensitive.
/T[:]c,nn Default choice to c after nn seconds
text Prompt string to display
ERRORLEVEL is set to offset of key user presses in choices.
Back to TOC
command.com COMMAND.COM (really an .EXE)
--------
Starts a new copy of the Windows Command Interpreter.
COMMAND [[drive:]path] [device] [/E:nnnnn] [/L:nnnn] [/U:nnn] [/P] [/MSG]
[/LOW] [/Y [/[C|K] command]]
[drive:]path Specifies the directory containing COMMAND.COM.
device Specifies the device to use for command input and output.
/E:nnnnn Sets the initial environment size to nnnnn bytes.
(nnnnn should be between 256 and 32,768).
/L:nnnn Specifies internal buffers length (requires /P as well).
(nnnn should be between 128 and 1,024).
/U:nnn Specifies the input buffer length (requires /P as well).
(nnn should be between 128 and 255).
/P Makes the new Command Interpreter permanent (can't exit).
/MSG Stores all error messages in memory (requires /P as well).
/LOW Forces COMMAND to keep its resident data in low memory.
/Y Steps through the batch program specified by /C or /K.
/C command Executes the specified command and returns.
/K command Executes the specified command and continues running.
Back to TOC
debug.exe More Info here: DEBUG
--------
Runs Debug, a program testing and editing tool.
DEBUG [[drive:][path]filename [testfile-parameters]]
[drive:][path]filename Specifies the file you want to test.
testfile-parameters Specifies command-line information required by
the file you want to test.
After Debug starts, type ? to display a list of debugging commands.
Back to TOC
deltree.exe Delete Tree (all files)
--------
Deletes a directory and all the subdirectories and files in it.
To delete one or more files and directories:
DELTREE [/Y] [drive:]path [[drive:]path[...]]
/Y Suppresses prompting to confirm you want to delete
the subdirectory.
[drive:]path Specifies the name of the directory you want to delete.
Note: Use DELTREE cautiously. Every file and subdirectory within the
specified directory will be deleted.
Back to TOC
diskcopy.com Copy Floppy Disks
--------
Copies the contents of one floppy disk to another.
DISKCOPY [drive1: [drive2:]] [/1] [/V] [/M]
/1 Copies only the first side of the disk.
/V Verifies that the information is copied correctly.
/M Force multi-pass copy using memory only.
The two floppy disks must be the same type.
You may specify the same drive for drive1 and drive2.
Back to TOC
doskey.com
--------
Edits command lines, recalls command lines, and creates macros
DOSKEY [/switch ...] [macroname=[text]]
/BUFSIZE:size Sets size of macro and command buffer (default:512)
/ECHO:on|off Enables/disables echo of macro expansions (default:on)
/FILE:file Specifies file containing a list of macros
/HISTORY Displays all commands stored in memory
/INSERT Inserts new characters into line when typing
/KEYSIZE:size Sets size of keyboard type-ahead buffer (default:15)
/LINE:size Sets maximum size of line edit buffer (default:128)
/MACROS Displays all DOSKey macros
/OVERSTRIKE Overwrites new characters onto line when typing (default)
/REINSTALL Installs a new copy of DOSKey
macroname Specifies a name for a macro you create
text Specifies commands you want to assign to the macro
UP,DOWN arrows recall commands
Esc clears current command
F7 displays command history
Alt+F7 clears command history
[chars]F8 searches for command beginning with [chars]
F9 selects a command by number
Alt+F10 clears macro definitions
The following are special codes you can use in DOSKey macro definitions:
$T Command separator: allows multiple commands in a macro.
$1-$9 Batch parameters: equivalent to %1-%9 in batch programs.
$* Symbol replaced by everything following macro name on the
command line.
Back to TOC
edit.com
--------
MS-DOS Editor Version 2.0.026
EDIT [/B] [/H] [/R] [/S] [/] [/?] [file(s)]
/B - Forces monochrome mode.
/H - Displays the maximum number of lines possible for your
hardware.
/R - Load file(s) in read-only mode.
/S - Forces the use of short filenames.
/ - Load binary file(s), wrapping lines to characters
wide.
/? - Displays this help screen.
[file] - Specifies initial files(s) to load. Wildcards and
multiple filespecs can be given.
Back to TOC
extract.exe (Microsoft .CAB files)
--------
Microsoft (R) Diamond Extraction Tool - Version (16) 1.00.0602 (07/14/97)
EXTRACT [/Y] [/A] [/D | /E] [/L dir] cabinet [filename ...]
EXTRACT [/Y] source [newname]
EXTRACT [/Y] /C source destination
cabinet - Cabinet file (contains two or more files).
filename - Name of the file to extract from the cabinet.
Wild cards and multiple filenames (separated by
blanks) may be used.
source - Compressed file (a cabinet with only one file).
newname - New filename to give the extracted file.
If not supplied, the original name is used.
/A Process ALL cabinets. Follows cabinet chain
starting in first cabinet mentioned.
/C Copy source file to destination (to copy from DMF disks).
/D Display cabinet directory (use with filename to avoid
extract).
/E Extract (use instead of *.* to extract all files).
/L dir Location to place extracted files (default is current
directory).
/Y Do not prompt before overwriting an existing file.
Back to TOC
fc.exe File Compare
--------
Compares two files or sets of files and displays the differences between
them.
FC [/A] [/C] [/L] [/LBn] [/N] [/T] [/W] [/nnnn] [drive1:][path1]filename1
[drive2:][path2]filename2
FC /B [drive1:][path1]filename1 [drive2:][path2]filename2
/A Displays only first and last lines for each set of differences.
/B Performs a binary comparison.
/C Disregards the case of letters.
/L Compares files as ASCII text.
/LBn Sets the maximum consecutive mismatches to the specified number
of lines.
/N Displays the line numbers on an ASCII comparison.
/T Does not expand tabs to spaces.
/W Compresses white space (tabs and spaces) for comparison.
/nnnn Specifies the number of consecutive lines that must match after
a mismatch.
Back to TOC
fdisk.exe Partition (Hard) Disks
--------
Configures a hard disk for use with MS-DOS and Windows 95/98/2000.
FDISK [/STATUS] /X
/STATUS Displays partition information.
/X Ignores extended disk-access support. Use this switch if
you receive disk access or stack overflow messages.
Back to TOC
find.exe
--------
Searches for a text string in a file or files.
FIND [/V] [/C] [/N] [/I] "string" [[drive:][path]filename[ ...]]
/V Displays all lines NOT containing the specified string.
/C Displays only the count of lines containing the string.
/N Displays line numbers with the displayed lines.
/I Ignores the case of characters when searching for the
string.
"string" Specifies the text string to find.
[drive:][path]filename
Specifies a file or files to search.
If a pathname is not specified, FIND searches the text typed at the
prompt or piped from another command.
Back to TOC
format.com
--------
Formats a disk for use with MS-DOS.
FORMAT drive: [/V[:label]] [/Q] [/F:size] [/B | /S] [/C]
FORMAT drive: [/V[:label]] [/Q] [/T:tracks /N:sectors] [/B | /S] [/C]
FORMAT drive: [/V[:label]] [/Q] [/1] [/4] [/B | /S] [/C]
FORMAT drive: [/Q] [/1] [/4] [/8] [/B | /S] [/C]
/V[:label] Specifies the volume label.
/Q Performs a quick format.
/F:size Specifies the size of the floppy disk to format (such
as 160, 180, 320, 360, 720, 1.2, 1.44, 2.88).
/B Allocates space on the formatted disk for system files.
/S Copies system files to the formatted disk.
/T:tracks Specifies the number of tracks per disk side.
/N:sectors Specifies the number of sectors per track.
/1 Formats a single side of a floppy disk.
/4 Formats a 5.25-inch 360K floppy disk in a high-density
drive.
/8 Formats eight sectors per track.
/C Tests clusters that are currently marked "bad."
Back to TOC
keyb.com
--------
Configures a keyboard for a specific language.
KEYB [xx[,[yyy][,[drive:][path]filename]]] [/E] [/ID:nnn]
xx Specifies a two-letter keyboard code.
yyy Specifies the code page for the character set.
[drive:][path]filename Specifies the keyboard definition file.
/E Specifies that an enhanced keyboard is installed.
/ID:nnn Specifies the keyboard in use.
Back to TOC
label.exe
--------
Creates, changes, or deletes the volume label of a disk.
LABEL [drive:][label]
Back to TOC
mem.exe Memory
--------
Displays the amount of used and free memory in your system.
MEM [/CLASSIFY | /DEBUG | /FREE | /MODULE modulename] [/PAGE]
/CLASSIFY or /C Classifies programs by memory usage. Lists the size
of programs, provides a summary of memory in use,
and lists largest memory block available.
/DEBUG or /D Displays status of all modules in memory, internal
drivers, and other information.
/FREE or /F Displays information about the amount of free memory
left in both conventional and upper memory.
/MODULE or /M Displays a detailed listing of a module's memory use.
This option must be followed by the name of a module,
optionally separated from /M by a colon.
/PAGE or /P Pauses after each screenful of information.
Back to TOC
mode.com
--------
Configures system devices.
Printer port: MODE LPTn[:] [COLS=c] [LINES=l] [RETRY=r]
Serial port: MODE COMm[:] [BAUD=b] [PARITY=p] [DATA=d] [STOP=s]
[RETRY=r]
Device Status: MODE [device] [/STATUS]
Redirect printing: MODE LPTn[:]=COMm[:]
Prepare code page: MODE device CP PREPARE=((yyy[...])
[drive:][path]filename)
Select code page: MODE device CP SELECT=yyy
Refresh code page: MODE device CP REFRESH
Code page status: MODE device CP [/STATUS]
Display mode: MODE [display-adapter][,n]
MODE CON[:] [COLS=c] [LINES=n]
Typematic rate: MODE CON[:] [RATE=r DELAY=d]
Back to TOC
more.com
--------
Displays output one screen at a time.
MORE [drive:][path]filename
MORE < [drive:][path]filename
command-name | MORE [drive:][path][filename]
[drive:][path]filename Specifies file(s) to display one screen at
a time.
command-name Specifies a command whose output will be
displayed.
Back to TOC
mscdex.exe CD-ROM Program
--------
Allows MS-DOS to communicate with CD-ROM drives. (Note: A 'driver'
program for the specific type of CD-ROM drive must be installed
first -- usually listed in the machine's CONFIG.SYS file.)
Usage: MSCDEX [/E/K/S/V] [/D: ... ] [/L:] [/M:]
Back to TOC
nlsfunc.exe
--------
Loads country-specific information.
NLSFUNC [[drive:][path]filename]
[drive:][path]filename Specifies the file containing
country-specific information.
Back to TOC
qbasic.exe Quick-Basic Interpreter
--------
Starts the MS-DOS QBasic programming environment.
QBASIC [/B] [/EDITOR] [/G] [/H] [/MBF] [/NOHI]
[[/RUN] [drive:][path]filename]
/B Allows use of a monochrome monitor with a color graphics
card.
/EDITOR Starts the MS-DOS Editor.
/G Provides the fastest update of a CGA screen.
/H Displays the maximum number of lines possible for your
hardware.
/MBF Converts the built-in functions MKS$, MKD$, CVS, and CVD
to MKSMBF$, MKDMBF$, CVSMBF, and CVDMBF, respectively.
/NOHI Allows the use of a monitor without high-intensity support.
/RUN Runs the specified Basic program before displaying it.
[[drive:][path]filename] Specifies the program file to load or run.
Back to TOC
scandisk.exe
--------
SCANDISK [drive:] [/a] [/n] [/p]
drive: to specify the drive(s) you want to check.
/a to check all your local, nonremovable hard disks.
/n to start and close ScanDisk automatically.
/p to prevent ScanDisk from correcting any errors it finds.
Examples:
========
To check drive D and start and close ScanDisk automatically, the
following command might be used:
c:\windows\scandisk.exe d: /n
To check all nonremovable hard disks but prevent ScanDisk from
correcting any errors it finds, this command could be used:
c:\windows\scandisk.exe /a /p
[NOTE: Scandskw.exe is the WINDOWS 9x/Me version of the DOS7
ScanDisk.]
Back to TOC
sort.exe
--------
Sorts input and writes results to the screen, a file, or another device.
SORT [/R] [/+n] [[drive1:][path1]filename1] [> [drive2:][path2]filename2]
[command |] SORT [/R] [/+n] [> [drive2:][path2]filename2]
/R Reverses the sort order; that is, sorts
Z to A, then 9 to 0.
/+n Sorts the file according to characters in
column n.
[drive1:][path1]filename1 Specifies file(s) to be sorted.
[drive2:][path2]filename2 Specifies a file where the sorted input is
to be stored.
command Specifies a command whose output is to be
sorted.
Back to TOC
start.exe Start (Windows Program)
--------
Runs a Windows program or an MS-DOS program.
START [options] program [arg...]
START [options] document.ext
/m[inimized] Run the new program minimized (in the background).
/max[imized] Run the new program maximized (in the foreground).
/r[estored] Run the new program restored (in the foreground).
[This is the default.]
/w[ait] Does not return until the other program exits.
Back to TOC
subst.exe Substitute
--------
Associates a path with a drive letter.
SUBST [drive1: [drive2:]path]
SUBST drive1: /D
drive1: Specifies a virtual drive to which you want to assign
a path.
[drive2:]path Specifies a physical drive and path you want to assign
to a virtual drive.
/D Deletes a substituted (virtual) drive.
Type SUBST with no parameters to display a list of current virtual
drives.
Back to TOC
sys.com (Copy) System Files
--------
Copies MS-DOS system files and command interpreter to a disk you specify.
SYS [drive1:][path] drive2:
[drive1:][path] Specifies the location of the system files.
drive2: Specifies the drive the files are to be copied to.
Back to TOC
xcopy.exe
--------
Copies files and directory trees.
XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/W]
[/C] [/I] [/Q] [/F] [/L] [/H] [/R] [/T] [/U]
[/K] [/N]
source Specifies the file(s) to copy.
destination Specifies the location and/or name of new files.
/A Copies files with the archive attribute set,
doesn't change the attribute.
/M Copies files with the archive attribute set,
turns off the archive attribute.
/D:date Copies files changed on or after the specified date.
If no date is given, copies only those files whose
source time is newer than the destination time.
/P Prompts you before creating each destination file.
/S Copies directories and subdirectories except empty ones.
/E Copies directories and subdirectories, including empty
ones. Same as /S /E. May be used to modify /T.
/W Prompts you to press a key before copying.
/C Continues copying even if errors occur.
/I If destination does not exist and copying more than one
file, assumes that destination must be a directory.
/Q Does not display file names while copying.
/F Displays full source and destination file names while
copying.
/L Displays files that would be copied.
/H Copies hidden and system files also.
/R Overwrites read-only files.
/T Creates directory structure, but does not copy files.
Does not include empty directories or subdirectories.
(/T /E includes empty directories and subdirectories.)
/U Updates the files that already exist in destination.
/K Copies attributes. Normal Xcopy will reset read-only
attributes.
/Y Overwrites existing files without prompting.
/-Y Prompts you before overwriting existing files.
/N Copy using the generated short names.
Back to TOC
xcopy32.exe
--------
Copies files and directory trees.
XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/W]
[/C] [/I] [/Q] [/F] [/L] [/H] [/R] [/T] [/U]
[/K] [/N]
source Specifies the file(s) to copy.
destination Specifies the location and/or name of new files.
/A Copies files with the archive attribute set,
doesn't change the attribute.
/M Copies files with the archive attribute set,
turns off the archive attribute.
/D:date Copies files changed on or after the specified date.
If no date is given, copies only those files whose
source time is newer than the destination time.
/P Prompts you before creating each destination file.
/S Copies directories and subdirectories except empty ones.
/E Copies directories and subdirectories, including empty
ones. Same as /S /E. May be used to modify /T.
/W Prompts you to press a key before copying.
/C Continues copying even if errors occur.
/I If destination does not exist and copying more than one
file, assumes that destination must be a directory.
/Q Does not display file names while copying.
/F Displays full source and destination file names while
copying.
/L Displays files that would be copied.
/H Copies hidden and system files also.
/R Overwrites read-only files.
/T Creates directory structure, but does not copy files.
Does not include empty directories or subdirectories.
( /T /E includes empty directories and subdirectories.)
/U Updates the files that already exist in destination.
/K Copies attributes. Normal Xcopy will reset read-only
attributes.
/Y Overwrites existing files without prompting.
/-Y Prompts you before overwriting existing files.
/N Copy using the generated short names.
Net work command for all…….
NETSTAT.exe TCP/IP Network Statistics
Displays protocol statistics and current TCP/IP network connections.
NETSTAT [-a] [-e] [-n] [-s] [-p proto] [-r] [interval]
-a Displays all connections and listening ports.
-e Displays Ethernet statistics. This may be combined with the
-s option.
-n Displays addresses and port numbers in numerical form.
-p proto Shows connections for the protocol specified by proto; proto
may be TCP or UDP. If used with the -s option to display
per-protocol statistics, proto may be TCP, UDP, or IP.
-r Displays the routing table.
-s Displays per-protocol statistics. By default, statistics
are shown for TCP, UDP and IP; the -p option may be used
to specify a subset of the default.
interval Redisplays selected statistics, pausing interval seconds
between each display. Press CTRL+C to stop redisplaying
statistics. If omitted, netstat will print the current
configuration information once.
________________________________________
First, I would recommend that you always use the '-a' parameter so you can see UDP 'listening ports' as well (often used by trojans), and not just the active TCP connections; then switch between using the '-a' and no parameters at all, to see the differences. When you're offline, you normally shouldn't see any connection data! If you do see an OPEN PORT NUMBER 'listening' for a connection (using the '-a' parameter), it may be that your computer has been infected with a trojan! Click this link for a few more ideas on how you can check to see if your computer is Trojan Free?
If you're running a server, such as the free XITAMI server, you might see something like this ("My_Comp" is the name of my computer):
C:\WINDOWS>netstat -a
Active Connections
Proto Local Address Foreign Address State
TCP My_Comp:ftp localhost:0 LISTENING
TCP My_Comp:80 localhost:0 LISTENING
Or with the "-an" parameters:
C:\WINDOWS>netstat -an
Active Connections
Proto Local Address Foreign Address State
TCP 0.0.0.0:21 0.0.0.0:0 LISTENING
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING
By simply opening a browser connection to both the HTTP (port 80) and FTP (port 21) servers (while still offline!), I saw the following:
C:\WINDOWS>netstat -a
Active Connections
Proto Local Address Foreign Address State
TCP My_Comp:ftp localhost:0 LISTENING
TCP My_Comp:80 localhost:0 LISTENING
TCP My_Comp:1104 localhost:0 LISTENING
TCP My_Comp:ftp localhost:1104 ESTABLISHED
TCP My_Comp:1102 localhost:0 LISTENING
TCP My_Comp:1103 localhost:0 LISTENING
TCP My_Comp:80 localhost:1111 TIME_WAIT
TCP My_Comp:1104 localhost:ftp ESTABLISHED
TCP My_Comp:1107 localhost:0 LISTENING
TCP My_Comp:1112 localhost:80 TIME_WAIT
UDP My_Comp:1102 *:*
UDP My_Comp:1103 *:*
UDP My_Comp:1107 *:*
This may be a bit confusing to some people, but remember I'm running BOTH the servers and clients on the same machine in these examples. A little later (using both 'a' and 'n') I got this:
C:\WINDOWS>netstat -an
Active Connections
Proto Local Address Foreign Address State
TCP 0.0.0.0:21 0.0.0.0:0 LISTENING
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING
TCP 0.0.0.0:1104 0.0.0.0:0 LISTENING
TCP 127.0.0.1:21 127.0.0.1:1104 FIN_WAIT_2
TCP 127.0.0.1:1102 0.0.0.0:0 LISTENING
TCP 127.0.0.1:1103 0.0.0.0:0 LISTENING
TCP 127.0.0.1:1104 127.0.0.1:21 CLOSE_WAIT
TCP 127.0.0.1:1107 0.0.0.0:0 LISTENING
UDP 127.0.0.1:1102 *:*
UDP 127.0.0.1:1103 *:*
UDP 127.0.0.1:1107 *:*
After turning off my server, I ended up with this for a while:
C:\WINDOWS>netstat -an
Active Connections
Proto Local Address Foreign Address State
TCP 127.0.0.1:80 127.0.0.1:1150 TIME_WAIT
TCP 127.0.0.1:80 127.0.0.1:1151 TIME_WAIT
________________________________________
PING.exe
Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
[-r count] [-s count] [[-j host-list] | [-k host-list]]
[-w timeout] destination-list
Options:
-t Ping the specifed host until interrupted.
-a Resolve addresses to hostnames.
-n count Number of echo requests to send.
-l size Send buffer size.
-f Set "Don't Fragment" flag in packet.
-i TTL Time To Live.
-v TOS Type Of Service.
-r count Record route for count hops.
-s count Timestamp for count hops.
-j host-list Loose source route along host-list.
-k host-list Strict source route along host-list.
-w timeout Timeout in milliseconds to wait for each reply.
________________________________________
There's one special IP number everyone should know about:
127.0.0.1 - localhost (or loopback).
This is used to connect ( through a browser, for example) to a Web server on your own computer. (127 being reserved for this purpose.) You can use this IP number at all times. It doesn't matter if you're connected to the Internet or not.
It's also called the loopback address because you can ping it and get returns even when you're offline (not connected to any network). If you don't get any valid replies, then there's a problem with the computer's Network settings. Here's a typical response to the 'ping' command:
Here's another recent example using the name of my computer which I have tied to the IP number 127.0.0.1 in my C:\WINDOWS\HOSTS file:
C:\WINDOWS>ping My_Comp
Pinging My_Comp [127.0.0.1] with 32 bytes of data:
Reply from 127.0.0.1: bytes=32 time=1ms TTL=128
Reply from 127.0.0.1: bytes=32 time=1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<10ms TTL=128
Reply from 127.0.0.1: bytes=32 time=1ms TTL=128
Ping statistics for 127.0.0.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
________________________________________
TRACERT.exe Trace Route
Usage:
tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name
Options:
-d Do not resolve addresses to hostnames.
-h maximum_hops Maximum number of hops to search for target.
-j host-list Loose source route along host-list.
-w timeout Wait timeout milliseconds for each reply.
________________________________________
Here's an example which traces the route from some ISP in Los Angeles to the main server at UCLA in California ( note how two computers relatively close to each other may be routed way round about! ):
C:\WINDOWS>tracert www.ucla.edu
Tracing route to www.ucla.edu [169.232.33.129]
over a maximum of 30 hops:
1 141 ms 132 ms 140 ms wla-ca-pm6.icg.net [165.236.29.85]
2 134 ms 131 ms 139 ms whv-ca-gw1.icg.net [165.236.29.65]
3 157 ms 132 ms 143 ms f3-1-0.lai-ca-gw1.icg.net [165.236.24.89]
4 194 ms 193 ms 188 ms a0-0-0-1.dai-tx-gw1.icg.net [163.179.235.61]
5 300 ms 211 ms 214 ms a1-1-0-1.ati-ga-gw1.icg.net [163.179.235.186]
6 236 ms 237 ms 247 ms a5-0-0-1.was-dc-gw1.icg.net [163.179.235.129]
7 258 ms 236 ms 244 ms 163.179.243.205
8 231 ms 233 ms 230 ms wdc-brdr-03.inet.qwest.net [205.171.4.153]
9 240 ms 230 ms 236 ms wdc-core-03.inet.qwest.net [205.171.24.69]
10 262 ms 264 ms 263 ms hou-core-01.inet.qwest.net [205.171.5.187]
11 281 ms 263 ms 259 ms hou-core-03.inet.qwest.net [205.171.23.9]
12 272 ms 229 ms 222 ms lax-core-02.inet.qwest.net [205.171.5.163]
13 230 ms 217 ms 230 ms lax-edge-07.inet.qwest.net [205.171.19.58]
14 228 ms 219 ms 220 ms 63-145-160-42.cust.qwest.net [63.145.160.42]
15 218 ms 222 ms 218 ms ISI-7507--ISI.POS.calren2.net [198.32.248.21]
16 232 ms 222 ms 214 ms UCLA--ISI.POS.calren2.net [198.32.248.30]
17 234 ms 226 ms 226 ms cbn5-gsr.calren2.ucla.edu [169.232.1.18]
18 245 ms 227 ms 235 ms www.ucla.edu [169.232.33.129]
Trace complete.
________________________________________
Note: Unless you're running a network, the following commands won't be of much use to you...
Furthermore, if you're concerned about Security, my advice is to NEVER use NetBios on a computer that connects to the Internet.
________________________________________
NBTSTAT.exe Net Bios Stats
Displays protocol statistics and current TCP/IP connections using NBT
(NetBIOS over TCP/IP).
NBTSTAT [-a RemoteName] [-A IP address] [-c] [-n] [-r] [-R] [-s] [S]
[interval]
-a (adapter status) Lists the remote machine's name table given its
name.
-A (Adapter status) Lists the remote machine's name table given its
IP address.
-c (cache) Lists the remote name cache including the IP
addresses.
-n (names) Lists local NetBIOS names.
-r (resolved) Lists names resolved by broadcast and via WINS
-R (Reload) Purges and reloads the remote cache name table
-S (Sessions) Lists sessions table with the destination IP
addresses.
-s (sessions) Lists sessions table converting destination IP
addresses to host names via the hosts file.
RemoteName Remote host machine name.
IP address Dotted decimal representation of the IP address.
interval Redisplays selected statistics, pausing interval seconds
between each display. Press Ctrl+C to stop redisplaying
statistics.
________________________________________
ROUTE.exe
Manipulates network routing tables.
ROUTE [-f] [command [destination] [MASK netmask] [gateway]]
-f Clears the routing tables of all gateway entries. If this is
used in conjunction with one of the commands, the tables are
cleared prior to running the command.
command Specifies one of four commands
PRINT Prints a route
ADD Adds a route
DELETE Deletes a route
CHANGE Modifies an existing route
destination Specifies the host to send command.
MASK If the MASK keyword is present, the next parameter is
interpreted as the netmask parameter.
netmask If provided, specifies a sub-net mask value to be associated
with this route entry. If not specified, if defaults to
255.255.255.255.
gateway Specifies gateway.
All symbolic names used for destination or gateway are looked up in the
network and host name database files NETWORKS and HOSTS, respectively.
If the command is print or delete, wildcards may be used for the
destination and gateway, or the gateway argument may be omitted.
________________________________________
ARP.exe Address Resolution Protocol
ARP -s inet_addr eth_addr [if_addr]
ARP -d inet_addr [if_addr]
ARP -a [inet_addr] [-N if_addr]
-a Displays current ARP entries by interrogating the current
protocol data. If inet_addr is specified, the IP and Physical
addresses for only the specified computer are displayed. If
more than one network interface uses ARP, entries for each ARP
table are displayed.
-g (Same as -a)
inet_addr Specifies an internet address.
-N if_addr Displays the ARP entries for the network interface
specified by if_addr.
-d Deletes the host specified by inet_addr.
-s Adds the host and associates the Internet address inet_addr
with the Physical address eth_addr. The Physical address is
given as 6 hexadecimal bytes separated by hyphens. The entry
is permanent.
eth_addr Specifies a physical address.
if_addr If present, this specifies the Internet address of the
interface whose address translation table should be
modified. If not present, the first applicable interface
will be used.
If you type the letters ftp at a DOS-Window (Command Line) prompt, like this:
C:\WINDOWS>ftp you will be placed into an interactive program with its own prompt: ftp>
Entering a question mark (?) or the word "help" will output a list of commands on your screen like this:
ftp> ?
Commands may be abbreviated. Commands are:
! delete literal prompt send
? debug ls put status
append dir mdelete pwd trace
ascii disconnect mdir quit type
bell get mget quote user
binary glob mkdir recv verbose
bye hash mls remotehelp
cd help mput rename
close lcd open rmdir
The ftp program in Windows 95 breaks the general rule of how you obtain help information directly from the command line. In most cases, you'd type the name followed by a space, a forward slash(/) and a question mark(?) to get it. But ftp requires a dash(-) and an (h) instead:
C:\WINDOWS>ftp -h
Transfers files to and from a computer running an FTP server service
(sometimes called a daemon). Ftp can be used interactively.
FTP [-v] [-d] [-i] [-n] [-g] [-s:filename] [host]
-v Suppresses display of remote server responses.
-n Suppresses auto-login upon initial connection.
-i Turns off interactive prompting during multiple file
transfers.
-d Enables debugging.
-g Disables filename globbing (see GLOB command).
-s:filename Specifies a text file containing FTP commands; the
commands will automatically run after FTP starts.
host Specifies the host name or IP address of the remote
host to connect to.
These commands show that you can run ftp "in the background" as it's called without ever having to interact with the program yourself. For now, let's use the program interactively to figure out what the commands actually do:
The first thing you need to be aware of is that all the commands within ftp are case-sensitive. Commands to your own ftp program (those listed above) use only lower-case characters. For example, entering "HELP" at the ftp prompt, outputs this on your screen: ?Invalid command
Here's the list of commands and a brief explanation of each one taken directly from the ftp helps within the program (and a few comments of my own):
? print local help information
help print local help information -- both do the same thing.
bell [toggle] beep when command completed
debug toggle debugging mode -- presents extra information about
the data passed between the connected computers.
glob toggle metacharacter expansion of local file names
hash toggle printing `#' for each buffer transferred
trace toggle packet tracing
verbose toggle verbose mode
status show current status
open connect to remote tftp -- you'll be asked for the URL if
you don't supply it.
user send new user information
remotehelp get help from remote server ==> Note: Becuase most of the
commands have critical timing requirements (such as the
PORT command), it's best to leave the handling of these
to the ftp program itself. However, I'd encourage you to
try the commands which do not involve the transfer of
files, such as STATS or STAT (depends upon the particular
server) or SYST, etc., so you can get more info about the
remote server you are interacting with. You will find two
examples of this instruction below; a * is usually placed
next to commands that are not active on the server.
literal send arbitrary ftp command
quote send arbitrary ftp command -- both do the same thing.
! escape to the shell -- You can carry out DOS commands on
your computer while still connected to a remote, then use
the "exit" command to return to your FTP session!
ascii set ascii transfer type
binary set binary transfer type
type set file transfer type
prompt force interactive prompting on multiple commands
Directory Commands:
pwd [display] working directory [from] remote machine
cd change remote working directory
lcd change local working directory
dir list contents of remote directory -- Use this command to
display attibutes, sizes, dates and times of files.
ls nlist contents of remote directory -- lists filenames only.
mdir list contents of multiple remote directories
mls nlist contents of multiple remote directories
mkdir make directory on the remote machine
rmdir remove directory on the remote machine
File Commands:
recv receive file
get receive file
mget get multiple files
send send one file
put send one file
mput send multiple files
append append to a file
rename rename file
delete delete remote file
mdelete delete multiple files
Ending a Session:
close terminate ftp session
disconnect terminate ftp session
bye terminate ftp session and exit
quit terminate ftp session and exit
Some Real FTP Server Examples:
Normally one would connect to a remote server by entering its URL on the same line as the ftp command itself (this way you can skip having to use the 'open' command). Our first fragment starts out this way ( I just thought you might like to see the header from Microsoft's FTP server):
C:\WINDOWS>ftp ftp.microsoft.com
Connected to ftp.microsoft.com.
220 CPMSFTFTPA04 Microsoft FTP Service (Version 5.0).
User (ftp.microsoft.com:(none)): anonymous
331 Anonymous access allowed, send identity (e-mail name) as password.
Password: [ Note: Passwords are always hidden from view. ]
230-This is FTP.MICROSOFT.COM. Please see the dirmap.txt file for more
information.
230 Anonymous user logged in.
This next example is longer and contains a number of commands in action:
C:\WINDOWS>ftp ftp.simtel.net
Connected to ftp.simtel.net.
220 ftphost.simtel.net FTP server (Version wu-2.5.0(1) Wed Jun 23
00:02:55 EDT 1999) ready.
User (ftp.simtel.net:(none)): anonymous
331 Guest login ok, send your complete e-mail address as password.
Password:
230- Welcome to FTPHost.Simtel.Net,
230- the Simtel.Net primary mirror site,
230- hosted through the courtesy of pair Networks.
230-
230-You are user 190 of 300 simultaneous users allowed. Access is
230-allowed at any time. If you have any unusual problems, please
230-report them via e-mail to support@Simtel.Net
230-
230-The Simtel.Net files are located in the /pub/simtelnet directory.
230-
230-Simtel.Net is also on the Web - http://www.simtel.net/simtel.net/
230-
230 Guest login ok, access restrictions apply.
ftp> remotehelp
214-The following commands are recognized (*'s are unimplemented).
USER PORT STOR MSAM* RNTO NLST MKD CDUP
PASS PASV APPE MRSQ* ABOR SITE XMKD XCUP
ACCT* TYPE MLFL* MRCP* DELE SYST RMD STOU
SMNT* STRU MAIL* ALLO CWD STAT XRMD SIZE
REIN* MODE MSND* REST XCWD HELP PWD MDTM
QUIT RETR MSOM* RNFR LIST NOOP XPWD
214 Direct comments to support@Simtel.Net.
ftp> quote SYST
215 UNIX Type: L8 Version: BSD-199506
ftp> quote STAT
211-ftphost.simtel.net FTP server status:
Version wu-2.5.0(1) Wed Jun 23 00:02:55 EDT 1999
Connected to 63.209.86.71
Logged in anonymously
TYPE: ASCII, FORM: Nonprint; STRUcture: File; transfer MODE: Stream
No data connection
0 data bytes received in 0 files
0 data bytes transmitted in 0 files
0 data bytes total in 0 files
63 traffic bytes received in 0 transfers
1613 traffic bytes transmitted in 0 transfers
1726 traffic bytes total in 0 transfers
211 End of status
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for file list.
pub
dsk3
dsk4
HEADER
dsk1
dsk2
bin
etc
.message
226 Transfer complete.
57 bytes received in 3.24 seconds (0.02 Kbytes/sec)
ftp> dir
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
total 18
-rw-r--r-- 1 root wheel 450 Jun 25 1999 .message
-rw-r--r-- 1 root wheel 423 Dec 8 1998 HEADER
d--x--x--x 2 root operator 512 Dec 15 1996 bin
drwxr-xr-x 3 root wheel 512 Dec 5 1998 dsk1
drwxr-xr-x 3 root wheel 512 Dec 5 1998 dsk2
drwxr-xr-x 3 root wheel 512 Dec 5 1998 dsk3
drwxr-xr-x 3 root wheel 512 Dec 5 1998 dsk4
d--x--x--x 2 root operator 512 Jun 25 1999 etc
drwxr-xr-x 3 root wheel 512 Dec 5 1998 pub
226 Transfer complete.
490 bytes received in 0.11 seconds (4.45 Kbytes/sec)
ftp> debug
Debugging On.
ftp> status
Connected to ftp.simtel.net.
Type: ascii; Verbose: On; Bell: Off; Prompting: On; Globbing: On
Debugging: On; Hash mark printing: Off
ftp> dir
---> PORT 63,209,86,71,11,220
200 PORT command successful.
---> LIST
150 Opening ASCII mode data connection for /bin/ls.
total 18
-rw-r--r-- 1 root wheel 450 Jun 25 1999 .message
-rw-r--r-- 1 root wheel 423 Dec 8 1998 HEADER
d--x--x--x 2 root operator 512 Dec 15 1996 bin
drwxr-xr-x 3 root wheel 512 Dec 5 1998 dsk1
drwxr-xr-x 3 root wheel 512 Dec 5 1998 dsk2
drwxr-xr-x 3 root wheel 512 Dec 5 1998 dsk3
drwxr-xr-x 3 root wheel 512 Dec 5 1998 dsk4
d--x--x--x 2 root operator 512 Jun 25 1999 etc
drwxr-xr-x 3 root wheel 512 Dec 5 1998 pub
226 Transfer complete.
490 bytes received in 5.87 seconds (0.08 Kbytes/sec)
[ I didn't get a chance to copy everything here! ]
ftp> quit
---> QUIT
221-You have transferred 0 bytes in 0 files.
221-Total traffic for this session was 5827 bytes in 5 transfers.
This last example is even longer and contains a file download among other things. This is the Geocities server that all the webpage authors use, so it can get pretty slow at times:
C:\WINDOWS>ftp ftp.geocities.com
Connected to ftp.geocities.com.
220-Welcome to the Yahoo! GeoCities FTP server.
220-IMPORTANT: This service has changed!
220-Get all details at:
220-http://help.yahoo.com/help/us/geo/gftp/
220-
220-No anonymous logins accepted.
220-
220-Enter new Yahoo! GeoCities member name
220
User (ftp.geocities.com:(none)): User NAME
331-Enter your Yahoo! GeoCities member password
331
Password: [ PASSWORD is always HIDDEN ]
230-Taking inventory on your homestead
230-Inventory completed
230-You are using 60.3% of your homestead.
230 You have 5.950 MB of space available.
ftp> remotehelp
200 PORT command successful.
214-The following commands are recognized (*'s are unimplemented).
USER QUIT MODE REST CWD STAT RMD XCUP
PASS PORT RETR RNFR XCWD HELP XRMD SIZE
ACCT* PASV STOR RNTO LIST NOOP PWD MDTM
SMNT* TYPE APPE ABOR NLST MKD XPWD
REIN* STRU ALLO DELE SYST XMKD CDUP
214 Direct comments to ftp-bugs@ftp2.
ftp> quote SYST
215 UNIX Type: L8
ftp> pwd
200 PORT command successful.
257 "/Athens/6939" is current directory.
---------------------------------------------------------------
[ NOTE: IF THE CONNECTION IS HAVING PROBLEMS OR IS JUST VERY
BUSY, YOU MAY GET THE FOLLOWING REPLY AT ANY TIME...]
425 Can't build data connection: Connection refused.
[ THE DATA MAY ALSO COME DOWN DURING A LATER COMMAND INSTEAD! ]
---------------------------------------------------------------
ftp> status
Connected to ftp.geocities.com.
Type: ascii; Verbose: On; Bell: Off; Prompting: On; Globbing: On
Debugging: Off; Hash mark printing: Off
ftp> cd CHI
250 CWD command successful.
ftp> dir
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
total 400
-rwxrw-r-x 1 webmastr webmastr 69123 May 23 1997 CG11.JPG
-rwxrw-r-x 1 webmastr webmastr 80165 Jul 21 1998 STG3.jpg
-rwxrw-r-x 1 webmastr webmastr 23615 Aug 20 23:05 SonarDiplomaASW.gif
-rwxrw-r-x 1 webmastr webmastr 2912 Feb 17 1999 bootcamp.html
-rwxrw-r-x 1 webmastr webmastr 14636 Aug 20 23:05 sonrdip.gif
226-ASCII mode
226 Transfer complete.
350 bytes received in 0.16 seconds (2.19 Kbytes/sec)
ftp> cd ..
250 CWD command successful.
ftp> cd XYZ
250 CWD command successful.
ftp> dir
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
total 1392
-rwxrw-r-x 1 webmastr webmastr 60793 Jul 7 1998 ATEAM.jpg
-rwxrw-r-x 1 webmastr webmastr 102535 Jul 21 1998 CircuitBoard.jpg
-rwxrw-r-x 1 webmastr webmastr 36964 Jul 21 1998 Harness.jpg
-rwxrw-r-x 1 webmastr webmastr 38442 Jul 21 1998 MTestSta.jpg
-rwxrw-r-x 1 webmastr webmastr 43535 Jul 21 1998 Monitors.jpg
-rwxrw-r-x 1 webmastr webmastr 32785 Jul 21 1998 Projectr.jpg
-rwxrw-r-x 1 webmastr webmastr 13132 Jul 21 1998 PwrTranHS.jpg
-rwxrw-r-x 1 webmastr webmastr 58725 Jul 7 1998 TWOBILLS.jpg
-rwxrw-r-x 1 webmastr webmastr 120265 Jul 21 1998 Testing.jpg
-rwxrw-r-x 1 webmastr webmastr 13174 Jul 21 1998 TimeMagGlenCa.jpg
-rwxrw-r-x 1 webmastr webmastr 67882 Jul 7 1998 WORKSTAT.jpg
-rwxrw-r-x 1 webmastr webmastr 38044 Jul 21 1998 Wiring.jpg
-rwxrw-r-x 1 webmastr webmastr 981 Jun 22 1999 XYTRON.html
-rwxrw-r-x 1 webmastr webmastr 23031 Jul 21 1998 Xfrmrs.jpg
-rwxrw-r-x 1 webmastr webmastr 957 Nov 8 1998 starman.html
-rwxrw-r-x 1 webmastr webmastr 221 Jul 19 1998 tron.html
-rwxrw-r-x 1 webmastr webmastr 1385 Nov 8 1998 twobills.html
226-ASCII mode
226 Transfer complete.
1166 bytes received in 1.76 seconds (0.66 Kbytes/sec)
ftp> get Testing.jpg
200 PORT command successful.
150 Opening ASCII mode data connection for Testing.jpg (120265 bytes).
######################################################
226-ASCII mode
226 Transfer complete.
120687 bytes received in 47.45 seconds (2.54 Kbytes/sec)
ftp> debug
Debugging On.
ftp> cd ..
---> CWD ..
250 CWD command successful.
ftp> close
---> QUIT
221 Goodbye.
ftp> quit
C:\WINDOWS>
Subscribe to:
Post Comments (Atom)
Thanx for the trick
ReplyDelete