I have an iBasso DX50 digital music player and I have all of my music for it stored on a 128 GB micro SD card. I sync my music directory to it using the following command.
rsync -a --delete SRC DEST but I've noticed some odd behavior. I thought the --delete option would only delete files and directories in the destination that were not in the source but it did something a little strange, no it didn't remove anything from my source directory. I had two directories for the same album but one of them must have been slightly different and it only had one song in it. Then after syncing one day rsync must have deleted the directory with all the songs in it and left only the one that had only one song. How does --delete work that it would have this behavior and what can I do to fix it? Thanks.
Jump to Post
--delete This tells rsync to delete extraneous files from the receiving side (ones that aren’t on the sending side), but only for the directories that are being synchronized. You must have asked rsync to send the whole directory (e.g. "dir" or "dir/") without using a wildcard …
All 4 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.