zlacker

[return to "Termux"]
1. Rygian+Qi[view] [source] 2026-02-02 13:29:57
>>tosh+(OP)
My usecase for Termux: most pictures get backed up properly into the home NAS, but the sync process sometimes skips a few [1] (which is exasperating, but here we are still not migrated to Immich).

So I have a python script in the NAS that calculates the MD5 checksum of every photo and video, and generates a shell script that, when executed on the phone, will calculate the MD5 on the local device, and delete if it is equal to the NAS.

The generated shell script gets sent to the phone, then I execute it from within a Termux window, pointing at the DCIM folder.

I can free up tens of GB of memories with reliability in the face of a misbehaving sync algorithm.

[1] https://help.nextcloud.com/t/auto-upload-is-skipping-random-...

◧◩
2. overfe+p31[view] [source] 2026-02-02 17:34:40
>>Rygian+Qi
> I execute it from within a Termux window...

If you install Termux widgets, you can directly start the script from your Android launcher's Home screen.

◧◩◪
3. Rygian+4h1[view] [source] 2026-02-02 18:39:33
>>overfe+p31
Since this process happens just a couple times per year, I find it reassuring to edit the file on the phone, check its contents, run it first in dry-run (the default), grep the output to my leasure, and only then run it in anger.
◧◩◪◨
4. overfe+tt1[view] [source] 2026-02-02 19:42:46
>>Rygian+4h1
The widget would be overkill. My tasks were more frequent - several times weekly. The scripts were a hacked-up first step towards cron automation, and occasionally needed to be re-run. Everything is now in a neat, cron-triggered Home Assistant automation with events instead of questionable 'sleep' lines.
[go to top]