about summary refs log tree commit diff
path: root/users/wpcarro/website/blog/posts
diff options
context:
space:
mode:
Diffstat (limited to 'users/wpcarro/website/blog/posts')
-rw-r--r--users/wpcarro/website/blog/posts/tee-time.md16
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
+```