Linux Format

Answers

Neil Bothwick finds the fault in our stars and fixes em!

Q Synchronised sounds

I have a music collection that’s stored on both local and external drives. I have just sorted through all the duplicates with fdupes. Now my local collection is only two-thirds of my external collection.

I could delete the external copy and re-copy everything from local to external again. This would take hours, but at least it would be done afterwards. I’m looking for a more sophisticated approach that builds on the fact that every file stored at local is also stored on external. On external the files are just not sorted right and lots of duplicates are present.

Because I have two more collections to sort through, it would be nice to have a better solution then having to copy everything over multiple times.

Joe Doyle

A The utility you’re looking for is rsync. As the name implies, this synchronises sets of data. Let’s say that your local and external directories are mounted at ~/local and ~/external. Then a simple sync is

The -a option is a shorthand flag that enables preserving timestamps, file ownerships, permissions and recursive scanning. The trailing slash on the directory names is significant to . It means to copy the contents of the directory, and to , and without the trailing slash it would be copied to . compares the files at the two locations and only copies those that don’t exist or are different on the destination. In addition, it can also copy the parts of large files that have changed.

You’re reading a preview, subscribe to read more.

More from Linux Format

Linux Format2 min read
Back Issues Missed One?
ISSUE 313 April 2024 Product code: LXFDB0313 In the magazine Discover how to use the ultimate hacker’s toolkit, staying out of trouble while doing so. And join us as we take the Puppy Linux developer’s new distro for a run and explore its container
Linux Format2 min read
Distro Watch
Ubuntu 24.04 LTS Noble Numbat is currently scheduled for release on 25th April. At the time of writing, we’re working with a daily build and expect a full review next issue. Nevertheless, we discovered that Canonical has announced this LTS release wi
Linux Format5 min read
Tips For Managing Docker Containers
Everyone knows how containers revolutionised application building and deployment. Using a E disposable stack of containers that make up an app that aren’t using the docker-compose command to manage the stack are missing a trick. It allows the shippin

Related Books & Audiobooks