User Tools

Site Tools


bash:directories:monitor_a_directory_for_changes:using_iwatch

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

bash:directories:monitor_a_directory_for_changes:using_iwatch [2022/06/13 09:15] – created peterbash:directories:monitor_a_directory_for_changes:using_iwatch [2022/06/13 09:16] (current) peter
Line 1: Line 1:
 ====== BASH - Directories - Monitor a directory for changes - Using iwatch ====== ====== BASH - Directories - Monitor a directory for changes - Using iwatch ======
  
 +===== Install iwatch =====
 +
 +<code bash>
 +sudo apt install iwatch
 +</code>
 +
 +----
 +
 +===== Monitor a directory =====
 +
 +<code bash>
 +iwatch /somedir
 +
 +iwatch -r -c '(w; ps -aux)' | echo '%f was changed' /somedir
 +</code>
 +
 +<WRAP info>
 +**NOTE:**  Executes the **w** and **ps -aux** command upon the event occuring.
 +</WRAP>
 +
 +
 +----
 +
 +==== References ====
 +
 +http://manpages.ubuntu.com/manpages/bionic/man1/iwatch.1.html
bash/directories/monitor_a_directory_for_changes/using_iwatch.1655111743.txt.gz · Last modified: 2022/06/13 09:15 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki