Databases Reference
In-Depth Information
Figure 5-4
As shown in Figure 5-5, drive C: has 20GB free, and drive D: has 45GB free.
Figure 5-5
Navigating the File System
After you have the list of file system drives, you can navigate through them for files and directories. In
Windows PowerShell, the working directory, or the current directory you are in, is called location .Asin
command-line interfaces such as Cmd.exe , you can refer to all the objects under the current location using
a relative path. Alternately, you can refer to them using an absolute path from the root of the file system
drive.
The core cmdlets you can use to change the current location are listed in Table 5-1.
Table 5-1: cmdlets to Change Location
cmdlet Name
Alias
Description
Set - Location
sl , cd , chdir Sets the current working location to a specified location
Get - Location
gl , pwd
Gets information about the current working location
Pushes the current location onto the stack that contains the ordered
history of locations where you have been
Push-Location Pushd
Changes the current location to the location most recently pushed
onto the stack
Pop-Location Popd
The Set-Location command enables you to specify the current location. Suppose you are in the root of
the C: drive. The following command changes the current location to C:\Windows :
Set-Location -Path C:\Windows
Search WWH ::




Custom Search