rsync alternative? (too many files)

Don Marti dmarti at zgp.org
Sun Mar 6 15:35:18 PST 2011


begin Seth David Schoen quotation of Sun, Mar 06, 2011 at 03:19:53PM -0800:

> You could perhaps use this information as part of something like
> 
> find . -type f -printf '%p\t%i\n' | sort -k 2 -n | uniq --all-repeated=separate -f 1 | awk '/./ && inside { print "ln "  master " "  $1; }; /./ && !inside { master = $1; inside = 1; }; ! /./ { inside = 0; }'
> 
> This would break if filenames contain spaces but it should be possible
> to adjust it so it doesn't.

Most of the GNU utilities have an option that will
use a null byte instead of a linefeed as a delimiter.
Useful for handling other people's files.

find has "-print0", sort and uniq have "-z", don't
know about awk.

-- 
Don Marti                    
http://zgp.org/~dmarti/
dmarti at zgp.org


More information about the bad mailing list