Mondoo Docs

File on the system

file MQL resource for querying Operating System infrastructure with cnquery and cnspec.

Operating System

File on the system

Use MQL in cnspec shell or policy:

file
Min version: 5.0.0Defaults: path size permissions.string

Relationships

Mini Map
Operating System
4 resources · 4 relationshipsClick to select, expand fields to see properties.

Fields (11)

FieldTypeDescription
basename
stringFilename without path prefix of this file
content
stringContents of this file
contextprivate
file.contextFile context is a range of lines/columns in a file
dirname
stringPath to the folder containing this file
empty
intWhether the path is empty
exists
intWhether this file exists on the system
group
groupOwnership information about the group
pathrequired
stringLocation of the file on the system
permissions
file.permissionsPermissions for this file
size
intSize of this file on disk
user
userOwnership information about the user