From owner-freebsd-questions Tue Dec 18 0:35:14 2001 Delivered-To: freebsd-questions@freebsd.org Received: from hawk-systems.com (hawk-systems.com [161.58.152.235]) by hub.freebsd.org (Postfix) with ESMTP id 0101537B416 for ; Tue, 18 Dec 2001 00:35:12 -0800 (PST) Received: from cr159591a (CPE00a00cc12af5.cpe.net.cable.rogers.com [24.102.18.54]) by hawk-systems.com (8.11.6) id fBI8ZAM75572 for ; Tue, 18 Dec 2001 01:35:11 -0700 (MST) From: "Dave VanAuken" To: Subject: retrieve and delete remote file via ssh Date: Tue, 18 Dec 2001 03:38:47 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Am looking to do the following, can't put my finger on it. Goal: scp or rsync file(s) from remote server, then remove them from remote server Scenario: Server is generating task lists or information items in flat text file for a number of slave servers. Slave servers (cron) retrieve the content of their file and delete or truncate the file. The main server rebuilds the file with new items while the server is processing its current list prior to retrieving the next batch. Problem: Getting files over is not an issue, but deleting or 0-lengthing the file after it has been retrieved to avoid duplicate entries is... not sure how to go about this and have been staring at the problem for too long for it to click. Appreciate any pointers. Am using SSH with keys. Dave To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message