Hopefully, this simple question has a simple answer.

I want to run rsync recursively using the -r option, but without descending into a different mount point (file system). i.e. like the -mount option with the find command, one man page reads, e.g., “Don't descend directories on other filesystems. An alternate name for -xdev, for compatibility with some other versions of find.”

1 Answer 1


I believe that you want the -xx option:

-x, --one-file-system
This tells rsync to avoid crossing a filesystem boundary when recursing. This does not limit the user's ability to specify items to copy from multiple filesystems, just rsync's recursion through the hierarchy of each directory that the user specified, and also the analogous recursion on the receiving side during deletion. Also keep in mind that rsync treats a lqbindrq mount to the same device as being on the same filesystem.

If this option is repeated, rsync omits all mount-point directories from the copy. Otherwise, it includes an empty directory at each mount-point it encounters (using the attributes of the mounted directory because those of the underlying mount-point directory are inaccessible).

The reason I say -xx is due to the bolded section (emphasis added).

  • Thanks. I must've passed over that a dozen times on the man page. :-)
    – danorton
    Commented Jul 31, 2013 at 14:59
  • No worries, I just used the search function (/) and looked for "mount". Took a few nexts. Glad it works!
    – nerdwaller
    Commented Jul 31, 2013 at 15:04

You must log in to answer this question.

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