You can use the following options with the filestats command:
The ages option of the filestats command enables you to see when files have been accessed. You can specify file ages in seconds, hours, and days, using a comma to separate each value. By default, file ages are broken down by days, in 30-day increments.
For example, to display files with ages under 900 seconds (15 minutes), 4 hours, and seven days, respectively, enter the following command:
filestats ages 900,4H,7D volume vol0 snapshot hourly.1
The output looks like the following:
AGE(ATIME) CUMULATIVE COUNT CUMULATIVE TOTAL KB
900 0 0
4H 0 0
7D 785 21568
MAX 882 146000
The timetype option enables you to specify the time types that you want to list in the age comparison.
The following table describes the valid timetype values you can use with the timetype option.
| Value | Definition |
|---|---|
| a | Access time |
| m | Modification time |
| c | File change time (last size/status change) |
| cr | File creation time |
The sizes option enables you to specify the breakdown of sizes, using a comma to separate each value. Default values are in bytes, but you can also use the following three suffixes at the end of a number you specify:
For example, to display file sizes in four categories--files with less than 500 kilobytes, files with less than 2 megabytes, files with less than 1 gigabyte, and all other files, enter the following command:
filestats sizes 500K,2M,1G volume vol0 snapshot hourly.1
The output looks like the following:
FILE SIZE CUMULATIVE COUNT CUMULATIVE TOTAL KB
500K 862 4969
2M 866 10748
1G 882 146000
MAX 882 146000
The style option controls the output style. The three style option arguments are as follows:
The expr option is an advanced option of the filestats command. The expr option enables you to specify a Boolean expression that the filestats command refers to for each file it encounters.
The following table lists valid file attributes that you can use with the expr option.
You can use the following standard Boolean expressions as arguments to the expr option.
| Argument | Argument |
|---|---|
| && | > |
| || | < |
| == | >= |
| != | >= |
| ! |
Note: Enclose the entire Boolean string following the expr option in quotation marks. Attributes you use in the string must be enclosed in braces {}.
For example, if you want to restrict the filestats command output to include only files whose size is greater than 10,000 bytes and whose UID is 5150, enter the following command:
filestats expr "{size}>10000&&{uid}==5150" volume vol0 snapshot hourly.0
Copyright © 1999, Network Appliance, Inc. All rights reserved.
Part No. 210-02334
File: disk8.htm
Last updated: 04/26/99 08:11:15