User Tools

Site Tools


directory:run_a_command_upon_files_or_directories_changes

Differences

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

Link to this comparison view

Next revision
Previous revision
directory:run_a_command_upon_files_or_directories_changes [2021/01/26 01:13] – created peterdirectory:run_a_command_upon_files_or_directories_changes [2021/01/26 10:53] (current) – removed peter
Line 1: Line 1:
-====== Directory - Run a Command Upon Files or Directories Changes ====== 
- 
-Use either inotifywait or iwatch. 
- 
-For example 
- 
-<code bash> 
-inotifywait -m -e modify,create -r /yourpath && \ 
-chmod 644 file; && \ 
-chown blah:blah file; 
-</code> 
- 
-<WRAP info> 
-**NOTE:** 
- 
-  * **-m, --monitor**:  Instead of exiting after receiving a single  event, execute indefinitely.  The default behavior is to exit after the first event occurs. 
-  * **-r, --recursive**:  Watch all sub-directories of any directories passed as arguments.   Watches will be set up recursively to an unlimited depth.    
-    * Symbolic  links  are  not  traversed.  Newly created sub-directories will also be watched. 
-</WRAP> 
  
directory/run_a_command_upon_files_or_directories_changes.1611623635.txt.gz · Last modified: 2021/01/26 01:13 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki