diff options
author | William Carroll <wpcarro@gmail.com> | 2022-07-12T03·58-0700 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2022-07-12T04·01+0000 |
commit | 5188c689bff93182721abe6160da70ecbdaf8e0b (patch) | |
tree | 9e1506316dfddbbfa71f13ec3c267f62b9822849 /users/wpcarro/website/blog/posts | |
parent | 7885fe99dc42f8606aca5fde82477eb8c7d05c4e (diff) |
feat(wpcarro/blog): Short notes post on sudo tee r/4291
See post for more information :) Change-Id: I1e2c1e3997d895fd64f225b5f0bc91f5b26d3e96 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5940 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
Diffstat (limited to 'users/wpcarro/website/blog/posts')
-rw-r--r-- | users/wpcarro/website/blog/posts/tee-time.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/users/wpcarro/website/blog/posts/tee-time.md b/users/wpcarro/website/blog/posts/tee-time.md new file mode 100644 index 000000000000..c8107fcded69 --- /dev/null +++ b/users/wpcarro/website/blog/posts/tee-time.md @@ -0,0 +1,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 +``` |