Rsync help...

view full story

http://crunchbang.org – The previous example is very old-school.  If you prefer using find -print0 and xargs, try this one-liner:find . -type f -print0 | xargs -0 /bin/ls -tQ | (head -n 6; echo /media/500/sync) | xargs rsync -aLike too many examples involving xargs, the action of this statement is not obvious.  It relies on 1) the unusual -Q option to ls, 2) concatenating the target directory (via echo) to the list fed to xargs rsync, and 3) breaking the "rules" again by using xargs without -0 (safe because all strings with spaces are quoted).  It is functional, terse and fugly.  I would (HowTos)