Unix File Example

<< Click to Display Table of Contents >>

Navigation:  Example > Scripts >

Unix File Example

Using the Script 'UnixFileExample.sh' it is possible to obtain information about a file on a Unix based system.
An example on how to configure the Sensor can be found in the topic Scripts.

Executing the Script using the SSH Sensor will result in an output like this:

Size: 1099016

Last Access: 06.17.19 10:52

Last Write: 05.15.17 21:45

Checksum: 3F0BC167FA8EF1F7A38452A5FD16D077ED8EF657BB81CDCE5AF9537CA96E8345

To obtain a specific value, regular expressions can be used.

For example, the size can be obtained using the regular expression with an anonymous group:

Size: (.*)