Score:0

Copy new created file to annother folder

ng flag

I have folder A where a new pdf file is created automatically at irregular time occurrence from an external process. This is my archive folder. It should remain untouched. I need to make a copy of only this last created file to annother folder called B so that I can process it further. So whenever a new file is created I need a copy of just this new file to folder B. Intuitively I thought about using incrontab to monitor the event. Rsync does not looks able to satisfy my needs.

user535733 avatar
cn flag
Look up how to use a systemd "path" unit file to monitor a directory and to trigger a .service when that directory changes.
waltinator avatar
it flag
Are you using Ubuntu? What types of filesystems are source and destination? Read `man -k inotify`. Could you check every N minutes? `man -a crontab`. Read https://askubuntu.com/help/how-to-ask
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.