Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我开始 bash 脚本,并且我正在制作一个脚本来备份任何修改的目录。修改包括新文件/文件夹和对现有文件的修改。我将如何使用 inotify 进行此操作?
谢谢!
我认为您正在寻找该工具inotifywait。
inotifywait
例如:
inotifywait -r -m -e modify -e create <one_or_more_dirs> | while read line do echo $line done