1166
Touch a file in Linux (programming.dev)
you are viewing a single comment's thread
view the rest of the comments
[-] bjoern_tantau@swg-empire.de 132 points 3 months ago

Does anyone actually use touch for its intended purpose? Must be up there with cat.

[-] zurchpet@lemmy.ml 33 points 3 months ago

We use it to trigger service restarts.

touch tmp/service-restart.txt

Using monit to detect the timestamp change and do the actual restart command.

[-] dan@upvote.au 6 points 3 months ago

This is an interesting idea to allow non-root users to restart a service. It looks like this is doable with systemd too. https://superuser.com/a/1531261

[-] zurchpet@lemmy.ml 2 points 3 months ago

Indeed. Replacing monit with systemd for this job is still on our todo list.

load more comments (54 replies)
this post was submitted on 17 Mar 2024
1166 points (97.5% liked)

Programmer Humor

18292 readers
2024 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS