mirror of
https://github.com/inspec/inspec
synced 2024-11-23 21:23:29 +00:00
40 lines
798 B
Text
40 lines
798 B
Text
|
---
|
||
|
title: About the filesystem Resource
|
||
|
---
|
||
|
|
||
|
# filesystem
|
||
|
|
||
|
Use the `filesystem` InSpec resource to audit filesystem disk space usage
|
||
|
<br>
|
||
|
|
||
|
## Syntax
|
||
|
|
||
|
A `filesystem` resource block declares tests for disk space in a partion:
|
||
|
|
||
|
describe filesystem('/') do
|
||
|
its('size') { should be >= 32000 }
|
||
|
end
|
||
|
|
||
|
where
|
||
|
|
||
|
* `filesystem('/')` states that it will be looking at the root (/) partition
|
||
|
* `size` is measured in megabytes (MB)
|
||
|
|
||
|
<br>
|
||
|
|
||
|
## Examples
|
||
|
|
||
|
The following examples show how to use this InSpec audit resource.
|
||
|
|
||
|
### Test if the root partition is greater thank 32000 MB
|
||
|
|
||
|
describe filesystem('/') do
|
||
|
its('size') { should be >= 32000 }
|
||
|
end
|
||
|
|
||
|
<br>
|
||
|
|
||
|
## Matchers
|
||
|
|
||
|
For a full list of available matchers please visit our [matchers page](https://www.inspec.io/docs/reference/matchers/).
|