Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Dec 2001 03:38:47 -0500
From:      "Dave VanAuken" <dave@hawk-systems.com>
To:        <freebsd-questions@FreeBSD.ORG>
Subject:   retrieve and delete remote file via ssh
Message-ID:  <DBEIKNMKGOBGNDHAAKGNAEPKKOAA.dave@hawk-systems.com>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DBEIKNMKGOBGNDHAAKGNAEPKKOAA.dave>