FG
💻 Software

rsync N newest files in a directory

Fresh7 days ago
Mar 15, 202615912 views
Confidence Score0%
0%

Problem

What would be the easiest way to go about rsyncing the n newest files in a directory to a remote server?

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: rsync N newest files in a directory

Low Risk

The easiest way is to run zsh instead of bash. In the parentheses, orders files by reverse modification time (i.e. by increasing age), and selects the first 42 matches. If you want only regular files and not directories, add a after the opening pare…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment