Jan-18-2022, 10:50 PM
At least for Ubuntu, incron will save the incrontab file in /var/spool/incron/
First you need to add yourself to the allowed users in:
/etc/incron.allow
Just your user name on one line.
Then you can edit your incrontab with
incrontab -e (this calls nano editor on my system)
I put this:
Now, if I copy a .jpg file to /home/pedro/temp it will immediately be sent to the printer of my choice, set in the bash script.
First you need to add yourself to the allowed users in:
/etc/incron.allow
Just your user name on one line.
Then you can edit your incrontab with
incrontab -e (this calls nano editor on my system)
I put this:
Quote:/home/pedro/temp IN_MODIFY /home/pedro/myBashscripts/lp_JPGv2.sh
Now, if I copy a .jpg file to /home/pedro/temp it will immediately be sent to the printer of my choice, set in the bash script.