2023-09-24 05:52:27 +02:00
|
|
|
# tree-owners
|
|
|
|
|
|
|
|
Find all owners (user and group) inside a directory tree.
|
|
|
|
|
2023-09-24 06:23:20 +02:00
|
|
|
© Adrian Wannenmacher - Licensed under the EUPL
|
|
|
|
|
2023-09-24 05:52:27 +02:00
|
|
|
## Usage
|
|
|
|
|
|
|
|
To see available options run: `tree-owners --help`
|
|
|
|
|
|
|
|
Basic example when running in this repository:
|
|
|
|
```
|
2023-11-17 07:16:19 +01:00
|
|
|
$ tree-owners
|
2023-09-24 05:52:27 +02:00
|
|
|
users:
|
2023-11-17 07:16:19 +01:00
|
|
|
adrian (1000)
|
2023-09-24 05:52:27 +02:00
|
|
|
|
|
|
|
groups:
|
2023-11-17 07:16:19 +01:00
|
|
|
users (985)
|
2023-09-24 05:52:27 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
Using `uid`s and `gid`s:
|
|
|
|
```
|
2023-11-17 07:16:19 +01:00
|
|
|
$ tree-owners --raw
|
2023-09-24 05:52:27 +02:00
|
|
|
users:
|
|
|
|
1000
|
|
|
|
|
|
|
|
groups:
|
|
|
|
985
|
|
|
|
```
|
|
|
|
|
|
|
|
Using `json` output:
|
|
|
|
```
|
2023-11-17 07:16:19 +01:00
|
|
|
$ tree-owners --json
|
2023-09-24 05:52:27 +02:00
|
|
|
{
|
2023-11-17 07:16:19 +01:00
|
|
|
"users": {
|
|
|
|
"1000": "adrian"
|
|
|
|
},
|
|
|
|
"groups": {
|
|
|
|
"985": "users"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
Combining `json` and `uid`/`gid`:
|
|
|
|
```
|
|
|
|
$ tree-owners --raw --json
|
|
|
|
{
|
|
|
|
"users": {
|
|
|
|
"1000": null
|
|
|
|
},
|
|
|
|
"groups": {
|
|
|
|
"985": "users"
|
|
|
|
}
|
2023-09-24 05:52:27 +02:00
|
|
|
}
|
|
|
|
```
|