# GetFileInfo

> Get attributes of files and directories.

Uses the CommandLine/Terminal to return type, creator, attributes, created, and modified file information of a file or directory.

- Page: https://loobins.io/binaries/getfileinfo/
- Author: Chris Campbell (@texasbe2trill)
- Created: 2023-04-23
- Tactics: Discovery

## Paths

- `/usr/bin/GetFileInfo`

## Example Use Cases

### Iterate through a directory to GetFileInfo

A bash or zsh oneliner can provide an attacker with information about specific files of interest.

```bash
for FILE in ~/Downloads/*; do echo $(GetFileInfo $FILE) >> fileinfo.txt; sleep 2; done
```

- Tactics: Discovery
- Tags: bash, zsh, oneliner

## Detections

- No detections at time of publishing

## Resources

- [macOS/binaries/GetFileInfo](https://macosbin.com/bin/getfileinfo)
