I'm writing a bash script, and I'd like to monitor file changes into a directory (adding, deleting and renaming) and performing different action accordingly.
Is there a way to do that directly from my script (aside from periodically ls
the directory and make diff
s)?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…