a hobby project: generate a rss feed based on recent file changes in a directory. But I thought this can also have many applications …
- auto formatting code files on change
- automatic backups of a certain folder: run rsync on change in folder.
Default language: English
a hobby project: generate a rss feed based on recent file changes in a directory. But I thought this can also have many applications …
Yeah after searching on the arch wiki, I guess systemd timers, not services, are specifically what I was interested in, thanks!
does lsblk
detect the device?
After some suggestions to check out inotifywait I ended up with a solution that works for me as desired.
inotifywait --event modify,create ./targetfolder/; echo "new change, that I am interested in, occurred in targetfolder";
It turned out I was interested in both file modification and file creation events.
On the upside, you do not need to install the inotifywait
package. md5sum
already installed on my system haha
meta: I know such questions have been asked before on stackoverflow; but lets bring them to fediverse as well (I hate stackoverflow web-design, google pop-ups, and javascript). I noticed there are always multiple ways to do such things in Linux. I think some options are very popular, while others go unmentioned (by LLMs for example). Also on different linux distributions there are different options available as far as I understand.
I really like this, replace compile with whatever command you desire I guess.
My first simple use case: I want to start a http (
busybox httpd
) server on localhost inside a certain directory whenever I turn the PC on.