From nobody Thu Apr 28 20:19:07 2022 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4C4741997C29 for ; Thu, 28 Apr 2022 20:19:09 +0000 (UTC) (envelope-from beckman@angryox.com) Received: from nog.angryox.com (nog.angryox.com [70.164.19.87]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Kq6Qh0pkqz3nkq for ; Thu, 28 Apr 2022 20:19:08 +0000 (UTC) (envelope-from beckman@angryox.com) Received: by nog.angryox.com (Postfix, from userid 1001) id 4754CB419; Thu, 28 Apr 2022 20:19:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=angryox.com; s=powerfulgood; t=1651177147; bh=VPjGLPGphTg2jpzgHhZWWIAgT123QmO0/lCjg/Ekx0g=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=Ka1KGka31ML+gDvl6s4aOcI3LoGWutnIl8n/e1Vsjmwde3gtPn7iMn205re5/pZho L9mT0F9X0EUMbOxolnZ8WKoEZzCO8iqj1KHTKQpq2EOFfXUtQ1X8ktsm3xU9dmNQoL mMRHsG8U/00SdPIiRoKad3ysn1H/uaSKU3imPNes= Received: from localhost (localhost [127.0.0.1]) by nog.angryox.com (Postfix) with ESMTP id 3DD04B418; Thu, 28 Apr 2022 16:19:07 -0400 (EDT) Date: Thu, 28 Apr 2022 16:19:07 -0400 From: Peter Beckman To: Lowell Gilbert cc: Andrea Venturoli , freebsd-ports@freebsd.org Subject: Re: Fill a disk with more recent files In-Reply-To: <444k2dyy9u.fsf@be-well.ilk.org> Message-ID: <6af4e90-f1f4-23de-51f5-7e6c8b71363@angryox.com> References: <444k2dyy9u.fsf@be-well.ilk.org> List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Rspamd-Queue-Id: 4Kq6Qh0pkqz3nkq X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=angryox.com header.s=powerfulgood header.b=Ka1KGka3; dmarc=none; spf=pass (mx1.freebsd.org: domain of beckman@angryox.com designates 70.164.19.87 as permitted sender) smtp.mailfrom=beckman@angryox.com X-Spamd-Result: default: False [-3.50 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[angryox.com:s=powerfulgood]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:nog.angryox.com]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[angryox.com]; NEURAL_HAM_LONG(-1.00)[-1.000]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[angryox.com:+]; NEURAL_HAM_SHORT(-1.00)[-0.999]; MLMMJ_DEST(0.00)[freebsd-ports]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:22773, ipnet:70.164.18.0/23, country:US]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N True, but it doesn't sort by date, which is what the OP wanted: to copy the files from newest to oldest, not just all the files newer than a date, until the disk was full. A combo of `ls` and `sort` to get the files on disk sorted by date (created/modified/accessed, your choice) into a file, then passing that file full of file paths to another app to copy, such as `xargs -n 50` combined with `rsync` or even just `cp` or `scp` should get the ball rolling. Beckman On Thu, 28 Apr 2022, Lowell Gilbert wrote: > Peter Beckman writes: > >> find doesn't have any sorting. > > Maybe not, but find does have "-newer", which do what the OP actually > wants with the assistance of an appropriate timestamp file. > > --------------------------------------------------------------------------- Peter Beckman Internet Guy beckman@angryox.com https://www.angryox.com/ ---------------------------------------------------------------------------