How can I detect any file or folder is being copied/moved to a directory and then run a shell script?
The files copied/moved would mostly have the same file names as the existing ones...
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
You should probably use
inotify, command line tools provided in
Also better should be the package
Description: trigger actions when files hit an incoming directory inoticoming is a daemon to watch a directory with Linux's inotify framework and trigger actions once files with specific names are placed in there. . For example it can be used to wait for .changes files uploaded into a directory and call reprepro to put them into your repository.