Filestats command options

Options to use with the filestats command

You can use the following options with the filestats command:

About the ages option

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.

Example of the ages option

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

About the timetype option

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

About the sizes option

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:

Example of the sizes option

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

About the style option

The style option controls the output style. The three style option arguments are as follows:

About the expr option

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.

Attribute Definition
tid Tree ID
type File type
perm Permissions
flags Additional flags
nlink Count of hard links
uid Numeric user ID of file owner
gid Numeric group ID of file owner
size Size, in bytes
blkcnt Size, in blocks
gen Generation number
atime Time of last read or write, in seconds
mtime Time of last write, in seconds
ctime Time of last size/status change
crtime Time of file creation
atimeage Access time, in seconds
mtimeage Modification age
ctimeage Size/status time age
crtimeage File creation age

Boolean expressions to 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 {}.


Example of the expr option

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-02166
File: disk8.htm
Last updated: 02/24/99 15:46:00