Hey all!
Let me go stratight to the point:
I have an audio player in which I want to clone my ~/Music directory when I connect it to my computer. The only relevant thing about it is that it’s a barebones filesystem and I cannot run cool stuff like Syncthing on the player (otherwise this question would already have a solution). Right now, my solution is that I connect the player to the computer and manually copy file to and delete files in the player. As you may have guessed, this is an error prone process. In order to solve that, I want to run a single command that clones ~/Music (src) into /path/to/player/Music (dst).
My requirements are:
- All new files in
srcMUST be copied intodst. - All files no longer present in
srcMUST be deleted fromdst. - All files present in both
srcanddstthat have more recent modifications insrcMUST be copied and overwritten intodst.
As you can see, my player’s filesystem is a strict replica of my main computer’s. Now, I know I can write a Python script in an afternoon to do just that, but I want to know if there are any good tools first to do this. I searched the web in hope that rsync would help me here, but the only answers I can find are for buffier cp. It may be that I have a vocabulary problem and I’m not searching for the correct terms.
I’d love to read your ideas! A note about LLMs: I’m not interested at all in any comments about how llm-of-the-week coded this in a moment, I asked fake-chat and here’s what it said or whatever. If you are not a human that can be bothered to write an answer, I won’t be bothered to read it.
Thank you!


rsync is made for quickly backing up huge directories over whatever connection. believe me you won’t need to script anything or parallelise it. just check the available flags.
My issue atm is that the destination filesystem is very slow, so just querying it every file’s timestamp add a very significant delay. Since I can treat my
~/Musicdirectory as the source of truth, I am considering writing a program that saves the status of the local filesystem at a point in time and then generates a diffing script when comparing it to a new status so I can use my fast, local computer to run the update checks.