Quantcast
Channel: SysAdmin Journal
Viewing all articles
Browse latest Browse all 321

A handy rsync command

$
0
0

I just needed to find files that aren’t older than 30 days and sync them. While I was thinking for combining find, rsync and the xargs commands, it turned out that all of the operation can be done from within rsync itself.

Rsync is a utility that allows synchronizing files on different computer systems. It is the usual choice of SysAdmins as it consumes less bandwidth during file copy; using compression during the transfer.
rsync -avzP --files-from<(find . -type f -mtime -30) ./ user@host:/path/

The beauty of the Linux command line is always amazing.

The post A handy rsync command appeared first on HACKLOG.


Viewing all articles
Browse latest Browse all 321

Trending Articles