From: Michal L. <mi...@lo...> - 2009-08-29 09:52:44
|
Mikhail Gusarov wrote: > Twas brillig at 21:33:06 29.08.2009 UTC+12 when mi...@lo... did gyre and gimble: > > >> I'd like to request a --one-file-system option (aka find's -mount/-xdev) > >> to sync, which would not cross local filesystem boundaries. > > ML> How to do that in a portable way? On Linux it can probably get away > ML> with some matching against /proc/mounts but how about other > ML> systems? Perhaps we can get some hints in rsync or du sources... > > On Unixes it can be detected by looking at os.stat results: if > os.stat(dir).st_dev != os.stat(parent).st_dev, then dir is a mountpoint. Ah, that makes sense. Thanks :-) Michal -- * http://smtp-cli.logix.cz - the ultimate command line smtp client |