🤗lemmyverseultrahug@lemmy.ml to Linux Questions@lemmy.zipEnglish · edit-22 days agoRun a shell script whenever a file in a certain directory changes?message-squaremessage-square22fedilinkarrow-up123arrow-down10file-text
arrow-up123arrow-down1message-squareRun a shell script whenever a file in a certain directory changes?🤗lemmyverseultrahug@lemmy.ml to Linux Questions@lemmy.zipEnglish · edit-22 days agomessage-square22fedilinkfile-text
Using a shell script, can I watch a folder and block program execution until a file in a certain folder changes?
minus-square🤗lemmyverseultrahug@lemmy.mlOPlinkfedilinkEnglisharrow-up1arrow-down2·2 days agoI really like this, replace compile with whatever command you desire I guess.
minus-squarehperrin@lemmy.calinkfedilinkEnglisharrow-up9·2 days agoThis is a terrible solution. You will stress your IO for no reason.
minus-square🤗lemmyverseultrahug@lemmy.mlOPlinkfedilinkEnglisharrow-up1arrow-down1·edit-21 day agoOn the upside, you do not need to install the inotifywait package. md5sum already installed on my system haha
minus-squarehperrin@lemmy.calinkfedilinkEnglisharrow-up11·1 day agoIf you are a big fan of wasting disk performance, CPU cycles, and ultimately power.
minus-squarePossibly linux@lemmy.zipMlinkfedilinkEnglisharrow-up2·1 day agoIt isn’t a terrible solution if you are checking infrequently just as ever 30 minutes.
minus-square🤗lemmyverseultrahug@lemmy.mlOPlinkfedilinkEnglisharrow-up2arrow-down1·1 day agoI do not need to install anything/can work on bare install without internet connection?
minus-squarePossibly linux@lemmy.zipMlinkfedilinkEnglisharrow-up1·edit-21 day agoYou should be able to tie into the kernel with some C programming if you want to go extra small.
I really like this, replace compile with whatever command you desire I guess.
This is a terrible solution. You will stress your IO for no reason.
On the upside, you do not need to install the
inotifywait
package.md5sum
already installed on my system hahaIf you are a big fan of wasting disk performance, CPU cycles, and ultimately power.
It isn’t a terrible solution if you are checking infrequently just as ever 30 minutes.
why is that a plus
I do not need to install anything/can work on bare install without internet connection?
ah, fair.
You should be able to tie into the kernel with some C programming if you want to go extra small.