Compartilhar via


Rsdir Examples

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

RSDir Examples

Example 1: Display the status of files in the local directory

The following command requests a basic display of the Remote Storage status of files in the directory from which the command is issued. Because the command uses the default value for all parameters, no parameters are needed.

C:\Inside Win2k\StartCD>RSDir

In response, RSDir displays the following information. For descriptions of the fields in the basic display, see Rsdir Remarks.

Showing information for <\\?\C:\Inside Win2k\StartCD\*.*>

Status        Attributes    Physical     Logical        Migrate Time File Name 
------        ----------    --------     -------        ------------ --------- 
non-HSM      --D-----R--           0           0                  NA .
non-HSM      --D-----R--           0           0                  NA ..
premigrated  A------PR-Z      104600      104600 04\27\2001 17:27:12 610215f.bmp
premigrated  A------PR-Z       93656       93656 04\27\2001 17:27:12 banner4.bmp
truncated    A-----OPR-Z           0      204800 04\27\2001 17:27:12 StartCD.exe
truncated    A-----OPR-Z           0        3747 04\27\2001 17:27:12 StartCD.ini

                4 File(s)          198256 bytes
                0 Dir(s)           208547 bytes required to recall offline files

This display lists the four files in the local directory and reveals that two are premigrated and two are migrated. The Migrate Time indicates that the files belong to the same BAG (migration group), meaning that they were copied to remote storage at the same time and are stored in the same data set on the remote media.

The two summary lines at the bottom of the display show the size that the file content consumes on the local disk and on remote media. Note that the local size is the sum of the physical size of all local files, including premigrated files. The "required to recall" size is the size of truncated files only.

This display does not reveal whether the premigrated files have ever been truncated, because the premigrated status is also used for files that are truncated and then recalled. That information can be inferred from data in the expanded (/f) display.

Finally, the local computer is in Eastern Standard Time, so the file content was actually moved at 12:27:12 local time.

Example 2: Display the detailed status of a file

The following command uses the /f parameter to request an expanded (full) display of the Remote Storage status of an executable file, Scan.exe. The command uses the redirection character (>) to direct the output to a text file, rss-scan.txt, for easier viewing. Also, because the path includes spaces, it is enclosed in quotation marks.

RSDir /f "c:\program files\scanco\scan.exe" > rss-scan.txt

In response, RSDir writes the following data to the rss-scan.txt file. (The display was edited in Notepad and arranged vertically for readability.)

For descriptions of the fields in the extended display, see Rsdir Remarks.

Status:            truncated
Attributes:        A-----OPR-Z
Physical:          0
Logical            2358435
Create Time        04\27\2001 17:08:19 
Last Access Time   04\27\2001 17:08:20
Last Modify Time   09\30\1999 10:38:32
Migrate Time       04\27\2001 17:27:23
RC                 0 
Last Recall Time   01\01\1601 00:00:00
HSM ID             {4d6e0baf-6d9c-4048-af3f-ca10d94cc8f9}
Bag ID             {21821bd8-dc91-4d13-ba8c-22f9e44b9e2f}
File ID            {00000000-0000-0000-0000-000000000000}  
File Version ID    125831615120000000
Data Stream        0
CRC Type           1
Data Stream CRC    4003735577
DS Size            2358435
DS Start           0 
Data Size          2358435
Data Start         322
File Size          2359296
File Start         327766016  
Ver Type           1 
Ver Info           59026 
File Name          C:\Program Files\Scanco\scan.exe

        1 File(s)               0 bytes
        0 Dir(s)          2358435 bytes required to recall offline files

Example 3: Display the status of files in a directory

The following command displays the Remote Storage status of the Win2K subdirectory:

RSDir "c:\inside win2k\symbols\win2k"

In response, RSDir displays the Remote Storage status of the subdirectory, not of the files it contains. Because Remote Storage migrates files, not directories, this information is not particularly enlightening.

Status        Attributes    Physical     Logical        Migrate Time File Name
------        ----------    --------     -------        ------------ ---------
non-HSM      --D-----R--           0           0                  NA Win2k

                0 File(s)               0 bytes
                1 Dir(s)                0 bytes required to recall offline files

The following command adds wildcard characters to request a display of the files in the specified directory.

RSDir "c:\inside win2k\symbols\win2k\*.*"

In response, RSDir displays the Remote Storage status of files in the Win2k subdirectory, revealing that all files are truncated, even though the subdirectory status is "non-HSM."

Showing information for <*.*>

Status        Attributes    Physical     Logical        Migrate Time File Name
------        ----------    --------     -------        ------------ ---------
non-HSM      --D-----R--           0           0                  NA .
non-HSM      --D-----R--           0           0                  NA ..
truncated    A-----OPR-Z           0       99120 04\27\2001 17:27:12 ntkrnlmp.dbg
truncated    A-----OPR-Z           0      738304 04\27\2001 17:27:12 ntkrnlmp.pdb
truncated    A-----OPR-Z           0       98720 04\27\2001 17:27:12 ntkrnlpa.dbg
truncated    A-----OPR-Z           0      738304 04\27\2001 17:27:12 ntkrnlpa.pdb
truncated    A-----OPR-Z           0       99312 04\27\2001 17:27:12 ntkrpamp.dbg
truncated    A-----OPR-Z           0      746496 04\27\2001 17:27:12 ntkrpamp.pdb
truncated    A-----OPR-Z           0     1805372 04\27\2001 17:27:12 ntoskrnl.dbg
truncated    A-----OPR-Z           0      738304 04\27\2001 17:27:12 ntoskrnl.pdb

                8 File(s)               0 bytes
                0 Dir(s)          5063932 bytes required to recall offline files

Note that the path is not displayed in the output because RSDir considers the search field to be "*.*". To display the path, use the /f parameter, or run RSDir from the local subdirectory, as shown in Example 1: Display the status of files in the local directory.

Example 4: Display the status of all files on a volume

The following command lists the Remote Storage status of all files on the E drive of the local computer, and stores the list in a file, RSS-E.txt. The command is run from the root of the E drive and uses the /s parameter to request a recursive display. It also uses the redirection character (>) to direct the output to the RSS-E.txt file.

E:\>RSDir /s > RSS-E.txt

In response, RSDir writes the Remote Storage status of every file on the E drive to the RSS-E.txt file.

The command is run locally, that is, from the root of the E drive, so that correct file paths appear in the basic display output. When you run the command from another directory and specify the files on the E drive, such as RSDir e:\*.*, the phrase *.* is displayed in the output, instead of path statements. (This is not necessary if you are requesting an extended (full) display.)

Also, RSDir does not display the Remote Storage status of drives. The command RSDir e: returns blank or inaccurate output.

Example 5: List all truncated files on a volume

The following command creates a list of all truncated files on the C drive of the local computer and stores the list in a text file.

The command uses the /f parameter to specify an extended display, which includes the file path, and the /s parameter to make the command recursive. Then, the command uses the pipe symbol (|) to send the output directly to Find, a tool included in Windows Server 2003. For information about using Find, see "Find" in Help for Windows Server 2003. The Find command finds and displays only lines containing the word "truncated." The redirection character (>) directs the output of the Find command to the Trunc-c.txt file.

RSDir c:\*.* /f /s | find "truncated" > trunc-c.txt

You can use this command format to create logs of the truncated or premigrated files on your volumes. You can also save the command in a batch file and use Scheduled Tasks in Control Panel or use Schtasks to run the command periodically. For information about using Schtasks, see "Schtasks" in Help for Windows Server 2003.

See Also

Concepts

Rsdir Overview
Rsdir Remarks
Rsdir Syntax
Topchk.cmd
Rsdiag Overview
Iologsum Overview
Health_chk Overview
Ftonline Overview
Filever Overview
Efsinfo Overview
Dmdiag Overview
Dskprobe Overview
Diruse Overview
Dfsutil Overview
Connstat Overview
Cabarc Overview
Bitsadmin Overview