2

I am looking for an alternative to the standard cp and mv command line tools, specifically I am looking for features such as:

  • detailed progress bar/reports
  • dry-run support
  • support for merging directories
  • no overwrite warning when source and destination files are identical
  • conflict resolution on overwrite (i.e. rename one of the files)
  • copying to multiple targets at once
  • multi-threading (i.e. continue copying in the background while I handle conflict resolution in the foreground)

So basically a feature set similar to what the Windows 8 Explorer can do when copying or moving files around.

PS: rsync with --progress --recursive --remove-source-files --checksum --backup is somewhat usable for merging directories, but still far from perfect, as it only removes source files, not directories and it doesn't really have much in terms of interactively resolving conflicts.

4 Answers 4

4

rsync can be used locally to copy/update files. As an example:

rsync --progress -a sourcedir/ destdir/

If you don't already have it,

sudo apt-get install rsync

There are a tremendous number of other things rsync does, see the man page for details and /usr/share/doc/rsync/ for examples.


ETA: Following up to the "PS" in the question, if you need even more sophisticated syncing, try:

sudo apt-get install unison unison-gtk

Run unison-gtk and set up a profile. Each time you run the sync from that profile, you'll be prompted what to do when there's a collision/conflict between the two directories in the profile. For each conflict, you'll interactively be able to choose the correct action (sync aa or skip) for each file.

1

You're looking for rsync. At least, I believe it supports everything you need.

I run it with the -A switch, although the manpage will show you everything you need.

In the worst case, or you can't find anything, you can make your own.

1

I wrote a quick little move.py script to handle directory merging, as while rsync works, rsync performs a copy not a rename and thus ends up being extremely slow on large datasets:

0

In addition to the other answers suggesting rsync, you can also use grsync. See this guide on how to use Rsync and Grsync Backups for Linux.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .