Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8015

Beginners • Re: How to move files automaticaly

$
0
0
It would be best to point the program which creates the files at your HDD directly. That'd be simplest.

If that is not possible you could write a short shell script to use Rsync to transfer the files from the directory on the microSD card to a directory on the HDD. There is an option --remove-source-files which erases the source files once the data has been transferred successfully.

Then once that shell script has been tested manually, you could install the incron package and use the inotify subsystem to watch the source directory and trigger that script whenever new files appear there. See the instructions for incrontab(5) about that. You may have to add the relevant account to the list in the /etc/incron.allow file first.

Statistics: Posted by tpyo kingg — Mon Aug 04, 2025 8:48 am



Viewing all articles
Browse latest Browse all 8015

Trending Articles