From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: TRS-80 Newsgroups: gmane.emacs.help Subject: Re: Deleting files Date: Mon, 22 Feb 2021 11:22:46 -0500 Message-ID: <6b5414d6dcdb20246c37593048366d33@isnotmyreal.name> References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22863"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Roundcube Webmail/1.3.15 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 22 17:26:08 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lEE2C-0005of-NH for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 22 Feb 2021 17:26:08 +0100 Original-Received: from localhost ([::1]:56698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lEE2B-000824-Of for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 22 Feb 2021 11:26:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56488) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lEDzn-00073u-Lk for help-gnu-emacs@gnu.org; Mon, 22 Feb 2021 11:23:44 -0500 Original-Received: from server173-4.web-hosting.com ([68.65.122.210]:40758) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lEDzk-0004I7-1z for help-gnu-emacs@gnu.org; Mon, 22 Feb 2021 11:23:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=isnotmyreal.name; s=default; h=Content-Transfer-Encoding:Content-Type: Message-ID:References:In-Reply-To:Subject:To:From:Date:MIME-Version:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=K7x4rJAO6hdtYrs+8GV08VfXNwogwOffPz9Of3qrZ9I=; b=nmoEor/Q0z5y4JoUeRmDqkYdEt jkttI8nYxAW4YFmYYVxVbe6Bg7RMWVGXbXTRN3XfoIx3l0aHkEdWGSpQgqlBPte4hVx0fW7yo/KLU g3erGk8P6WLh7z9N4uNfPYXAMc5STO297YXclZ1oxYjaL16tLbnGVQqKYN2Xu5L+0CdBNzMUBtpOC ZRNB0zbtYGW94uqusAhsIgQLuYBBUQMJ0ouG9k5Yzy1aQSylG1SwF2U5Rc3PPRPoRxlGCKSVyhcNI S+03/O/JY4dZemc9pmK3JgqKd3B1Gwd4yZDdXHRIEl1M9qK4g53nSYjl2w3s78etVYV9yJlLRtysN l4RPU0OA==; Original-Received: from [::1] (port=38608 helo=server173.web-hosting.com) by server173.web-hosting.com with esmtpa (Exim 4.93) (envelope-from ) id 1lEDyw-0001JK-DB for help-gnu-emacs@gnu.org; Mon, 22 Feb 2021 11:22:51 -0500 In-Reply-To: X-Sender: lists.trs-80@isnotmyreal.name X-OutGoing-Spam-Status: No, score=-0.2 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server173.web-hosting.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - isnotmyreal.name X-Get-Message-Sender-Via: server173.web-hosting.com: authenticated_id: lists.trs-80@isnotmyreal.name X-Authenticated-Sender: server173.web-hosting.com: lists.trs-80@isnotmyreal.name X-From-Rewrite: unmodified, already matched Received-SPF: pass client-ip=68.65.122.210; envelope-from=lists.trs-80@isnotmyreal.name; helo=server173-4.web-hosting.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HAS_X_OUTGOING_SPAM_STAT=0.231, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:128199 Archived-At: On 2021-02-21 18:01, michael-franzese@gmx.com wrote: > I have two directories with files, one is the "source", the other > "destination". I would like to have a script that checks file > in "source". If file name and size matches that at "destination", > the file at "source" is deleted. Preferably using bash. This may not be exactly what you are looking for, but there is also Syncthing[0], which does continual, automatic folder synchronization (bidirectional, or send / receive only). The reason I mention it, is because your workflow sounds vaguely reminiscent of how I manage my photos. I take almost all photos on my Android phone. They are synced (more or less) immediately with Syncthing to my NAS at home (in reality, a small SBC[1] running Armbian[2]). Then nightly (automatically, via cron), I run the sortphotos Python script, which moves the photos from the upload/sync folder into their final locations in a date based folder tree with consistent filenames which I call the timeline[3], along with giving them consistent filename format.[4] After that, I am free to add descriptions, tags, etc. on top of the base file name. Anyway, may or not be directly relevant, just thought I would mention it just in case. Cheers, TRS-80 [0] https://syncthing.net/ [1] Single Board Computer, see https://www.armbian.com/download/?device_support=Supported for examples [2] Debian for SBCs https://www.armbian.com/ [3] https://git.sr.ht/~trs-80/ostrta-spec/tree/HEAD/Specifications.md#filesystem [4] https://git.sr.ht/~trs-80/ostrta-spec/tree/HEAD/Specifications.md#filename