5.2. Managing Directories
All files that are saved to disk are stored in a hierarchical directory structure. All the files could be placed at the top of this structure, but it would be disorganized, and therefore poorly managed. Also, most top-level directories, or root directories, can hold a limited number of files. This directory structure can hold as many nested subdirectories as you want. The commands discussed in the following sections allow you to get listings of files as well as create and delete directories on your disk.
All command line tools in this section have not changed substantially since MS-DOS.
The first command that you will see is the directory command (dir). This command is used to get a listing of the files that are in a directory on your disk. Using dir by itself gives you the listing of your current directory. The current directory is usually listed in the command prompt, like this:
The dir command is very useful and has several options discussed later in this section. First, though, you need a firm grasp of wildcards, relative paths, and absolute paths.
Two wildcards can be used to modify what results you receive: * and ?. These can be used multiple times in different combinations in the same command to filter the results.
The * wildcard represents one or more characters. Here is an example of using the * wildcard to retrieve a list of files that match a certain pattern. The command