4.1.2. View the content of disk, directory and file |
Each operating system uses some sort of file structure (file system) for storage file to the intended media. Files containing data that the contents in them are grouped into groups so that each group - directory (folder, map) contains files similar characteristics (executable, system, library, music, video, etc.) regardless of whether they distributed operating system, control program or user. Within a directory must not only files but also it associated directories - subdirectories (subdirectory). All together makes a hierarchical structure that resembles a tree in which the branches are directories and leaves of branches are files. At the top is the ROOT directory.
Depending on the type of operating system directory can be a simple list of files that indicate which files belong to him, so directory is one kind of file (Unix, Linux ...), and attributes of files are records within the file, or is the directory special file which comprises the data files that are assigned to it, as the file name and its properties (Windows, DOS ...). No matter what it is used for any concept of a hierarchical directory structure that allows retrieval or save files in some of them to FILE SPECIFICATION that define the operating system as well as in the examples in Chapter 4.1.1 and 5.1.1.
Basic operating system commands relating to the movement along the tree structure of directories and view the contents of the individual. Moving from directory to directory is made command CD or command CHDIR (Change Directory) by syntax:
CD_[disk:][\path\]DIRECTORY (Int)
CD\
CD..
The first command enables you to set up a DOS disk in the specified directory, the second command to return to the ROOT - the beginning of the directory tree structure, and a third return to the parent directory relative to the current. Meaning supplements is:
disk: Any device wants to make directory, if not specified includes the device where it is. \path\ Path (directories) to the directory where you want create a new directory. If do not specify a new folder is created in the directory in which OS is currently located. DIRECTORY Directory name to 8 (eight) characters, as well as for the file.
The following examples are given orders to move through the tree drive [C:] to Figure 4.1.2 and directory KADAR created on the diskette [A:], with a prompt that shows where the current 'resident' OS.
Examples:
C:\>CD WINDOWS 1. section C:\WINDOWS\>CD SYSTEM C:\WINDOWS\SYSTEM\>CD.. C:\WINDOWS\>CD MSAPPS C:\> ---------------------- C:\WINDOWS\MSAPPS\>CD MSINFO 2. section C:\WINDOWS\MSAPPS\MSINFO\>CD.. C:\WINDOWS\MSAPPS\>CD.. C:\WINDOWS\>CD.. C:\> ---------------------- C:\>CD C:\WINDOWS\MSAPPS\MSINFO 3. section C:\WINDOWS\MSAPPS\MSINFO\>CD\ C:\> ---------------------- C:\>CD DOS 4. section C:\DOS\>A: A:\>CD KADAR A:\KADAR\>C: C:\DOS\>A: A:\KADAR\>C: C:\DOS\>CD.. C:\> ---------------------- C:\>CD A: 5. section A:\KADAR\ --> response to the previous command C:\> ---------------------- C:\>F: 6. section F:\>
If the OS is in one branch of the tree can not cross to another branch with command CD without prior returns to ROOT or a place where the branches meet. The second section of the first part of the example shows how to get to the desired directory and come back gradually. The third section shows a rapid transition to the desired directory and back. The fourth section shows the change directories and devices, the OS can remember the phone directory from which it is transferred to another device. The fifth section shows the use of the CD without an argument when it shows where the device OS last worked. The sixth section presents the possible change in the network devices when one of the drives of other computers see as [F:].
Creating a new directory is done MD command or command MKDIR (Make Directory) by the syntax:
MD_[disk:][\path\]DIRECTORY (Int)
Removing empty (no file) directory is made RD command or command RMDIR (Remove Directory). Command can not remove the directory that contains the files. The syntax is:
RD_[disk:][\path\]DIRECTORY (Int)
When creating and deleting directories no answer message is executed task. Control can be done TREE command.
Examples:
C:\WINDOWS\MSAPPS\>MD MSDRAW 1. section C:\WINDOWS\MSAPPS\>CD\ C:\> ---------------------- C:\>MD C:\WINDOWS\MSAPPS\WORDART 2. section C:\>
The first section shows how to create directories from the directory where you want to create a new directory, and the second section shows how to create the directory ROOT. When creating the directory does not answer a message on the performed task. Control by default commands can be executed TREE command.
Examples:
C:\WINDOWS\MSAPPS\>RD MSDRAW C:\WINDOWS\MSAPPS\>CD\ C:\> ---------------------- C:\>RD C:\WINDOWS\MSAPPS\WORDART C:\>
The examples show how to delete the directory and the directory of ROOT.
Command to VIEW the disc contents the DIR (DIRectory), with many extras, of which the most important are listed in the syntax onwards.
DIR_[disk:][\path][/P][/W][/A:H|/A:D][/O:N|/O:E] (Int)
Accessories DIR command are:
disk: The device which inspects the content. path Directory path that we want to examine the device. /P Allows to stop after completing the review screen. Pressing any button to view the next screen. /W Lets you see files arranged by columns. Keys /P and /W must be used simultaneously. /A:H Attribute which allows the display of hidden files. /A:D Attribute that allows only display directories. /O:N Enables print the contents sorted by filename. /O:E Allows print content sorted by type of file.
DIR without additives provides an overview of all the files in the directory in which it currently operates DOS and prints the name of the files, their type, size of B (bytes) and the date and time of creation. At the end of the list, followed by data on how the file is displayed and their total size and the amount of free disk space. Then the OS again appears with your prompt. Regardless of whether you are in the list of directories shown or not the total number at the end of the list still applies only to the current directory or a directory that is examined, and this information is not relevant to find out the total disk space usage.
An example of one complete display content directory is:
Volume in drive C is BUMA Directory of C:\WORK . <DIR> 12-28-94 10:08p .. <DIR> 12-28-94 10:08p GRBCRO BMP 141,558 12-20-94 2:36a NC CFG 2,225 09-01-93 12:00p NE COM 29,992 09-19-87 12:27p BRODOVI DBF 83,968 12-20-94 8:10a NE DOC 4,128 04-12-86 4:39a NC EXE 3,358 05-10-93 6:52p BUTTRFLY PCX 26,296 10-19-92 12:00p MS PCX 1,461 10-28-93 12:00a REALLIST WK1 6,321 09-16-88 2:01p 93-94-1 WKS 17,634 12-20-94 2:49a DISK WMF 4,132 04-19-94 12:00a TISAK WPS 4,096 12-13-94 6:58p TANKER XLS 7,330 11-26-94 11:50a 15 file(s) 332,499 bytes 113,586,176 bytes free
Example III
Using the DIR command with different parameters.
Display directories in DOS device [C:], where the files are arranged alphabetically by name in five columns. These are all transient commands and command of MS-DOS 6.2.
C:\DOS\>DIR /W/O:N or C:\>DIR C:\DOS /W/O:N
The answer to one of the computer's command is:
Volume in drive C is BUMA Directory of C:\DOS [.] [..] ANSI.SYS APPEND.EXE ATTRIB.EXE AUTOEXEC.UMB CHKDSK.EXE CHKLIST.MS CHKSTATE.SYS CHOICE.COM COMMAND.COM CONFIG.UMB COUNTRY.SYS DBLSPACE.BIN DBLSPACE.EXE DBLSPACE.HLP DBLSPACE.INF DBLSPACE.SYS DBLWIN.HLP DEBUG.EXE DEFAULT.SET DEFRAG.EXE DEFRAG.HLP DELOLDOS.EXE DELTREE.EXE DISKCOMP.COM DISKCOPY.COM DISPLAY.SYS DOSHELP.HLP DOSKEY.COM DRIVER.SYS EDIT.COM EDIT.HLP EGA.CPI EGA2.CPI EMM386.EXE EXPAND.EXE FASTHELP.EXE FASTOPEN.EXE FC.EXE FDISK.EXE FIND.EXE FORMAT.COM GRAPHICS.COM GRAPHICS.PRO HELP.COM HELP.HLP HIMEM.SYS INTERLNK.EXE INTERSVR.EXE KEYB.COM KEYBOARD.SYS KEYBRD2.SYS LABEL.EXE LOADFIX.COM MEM.EXE MEMMAKER.EXE MEMMAKER.HLP MEMMAKER.INF MEMMAKER.STS MODE.COM MONOUMB.386 MORE.COM MOVE.EXE MSAV.EXE MSAV.HLP MSAV.INI MSAVHELP.OVL MSAVIRUS.LST MSBACKDB.OVL MSBACKDR.OVL MSBACKFB.OVL MSBACKFR.OVL MSBACKUP.HLP MSBACKUP.EXE MSBACKUP.OVL MSBACKUP.INI MSBACKUP.LOG MSBACKUP.TMP MSBCONFG.HLP MSBCONFG.OVL MSCDEX.EXE MSD.COM MSD.EXE MSTOOLS.DLL NETWORKS.TXT NLSFUNC.EXE OS2.TXT POWER.EXE PRINT.EXE QBASIC.EXE QBASIC.HLP RAMDRIVE.SYS README.TXT REPLACE.EXE RESTORE.EXE SCANDISK.EXE SCANDISK.INI SETVER.EXE SHARE.EXE SIZER.EXE SMARTDRV.EXE SMARTMON.EXE SMARTMON.HLP SORT.EXE SUBST.EXE SYS.COM TREE.COM UNDELETE.EXE UNFORMAT.COM VFINTD.386 VIRSIGS.MS VSAFE.COM XCOPY.EXE 114 file(s) 4,037,112 bytes 113,954,816 bytes free
Display disk directory [C:] of complex alphabetically by name to get the command
C:\>DIR /W/A:D/O:N
And the answer is:
Volume in drive C is BUMA Directory of C:\ [BAT] [DOS] [MOUSE] [PROGRAMS] [TEMP] [TEMP-IE] [TOOLS] [WINDOWS] [WORK] 9 file(s) 0 bytes 97,169,408 bytes free
Showing all hidden files in the ROOT of devices [C:] of complex alphabetically by file type and no gain is reduced print command
C:\>DIR /A:H/O:E
And the answer is:
Volume in drive C is BUMA Directory of C:\ IMAGE IDX 29 12-30-94 12:58a SD INI 1,602 12-02-94 1:01p 386SPART PAR 7,962,624 12-30-94 1:14a IO SYS 40,566 09-27-93 6:20a MSDOS SYS 38,138 09-27-93 6:20a 5 file(s) 8,042,959 bytes 97,165,312 bytes free
View all file types .INI in WINDOWS directory allows JOKER-WILDCARD character ' * ' gives OS note that the name is of no importance. Character ' ? ' is a wild card that matches any single letter. As for this command is:
C:\>DIR C:\WINDOWS\*.ini /W/O:N
And the answer is:
Volume in drive C is BUMA Directory of C:\WINDOWS ARTGALRY.INI CLIPBRD.INI CLOCK.INI CONTROL.INI DOSAPP.INI EXCEL4.INI MOUSE.INI MPLAYER.INI MSD.INI MSDRAW.INI MSFNTMAP.INI MSMAIL.INI MSTXTCNV.INI MSWKSWIZ.INI MSWORKS3.INI NCDINFO.INI NETWATCH.INI ODBC.INI ODBCINST.INI ODBCISAM.INI PROGMAN.INI PROTOCOL.INI QE.INI SCHDPLUS.INI SERIALNO.INI SOL.INI SYSTEM.INI TTEMBED.INI WIN.INI WINCHAT.INI WINFILE.INI WINHELP.INI WINMETER.INI WINMINE.INI WINWORD6.INI WINZIP.INI 36 file(s) 37,754 bytes 97,161,216 bytes free
Command:
C:\>DIR C:\WINDOWS\MS?.*
provides an overview of all the files that begin with MS and have the name of three characters, were any type (file type is not important).
Command:
C:\>DIR C:\DOS\M*.EXE
allows you to view all files in the DOS directory starting with M and type are .EXE.
View the contents of the file itself is realized TYPE command. Command, unlike the previous version of DOS does not allow hexadecimal image files, and it makes sense to use it only for text files understandable. The syntax is:
TYPE_[disk:][\put\]IME.TIP (Int)
or abbreviated to these previously mentioned TYPE_#FS. It is useful for the longer view with the command used pooled MORE lest content 'ran' across the screen.
Controlled inspection files screen by screen, with instructions on how to use the MS-DOS command is obtained:
C:\>TYPE_C:\DOS\README.TXT | MORE
if the default place is ROOT, or command:
C:\DOS>TYPE_README.TXT | MORE
if the default directory where the file is located. Canceling a print command is already known combination <CTRL> + <C>.
Commands that allow review of the starting configuration and file system ROOT are:
C:\>TYPE autoexec.bat C:\>TYPE config.sys
It is not necessary to use MORE, because they are usually shorter than the length of one screen.
File binary content (executive) can not be 'read' this command, for example:
C:\>TYPE_C:\DOS\tree.com
To read the executable file used for the purpose designed software products.
Citing of this page: Radic, Drago. " Informatics Alphabet " Split-Croatia. {Date of access}; https://informatics.buzdo.com/file. Copyright © by Drago Radic. All rights reserved. | Disclaimer |