blob: c8107fcded69cb59f7528d34b2b37646371f303a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
I encountered this fun TIL while troubleshooting Linux write permissions
issues...
## TL;DR
Don't do this (unless you want misleading test results):
```shell
λ sudo -u node-exporter echo 'Hello, world' >/var/lib/textfile-exporter/test.prom
```
Do this:
```shell
λ echo 'Hello, world' | sudo -u node-exporter tee /var/lib/textfile-exporter/test.prom
```
|