Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Dec 2001 09:37:35 +0100
From:      Jon Molin <Jon.Molin@resfeber.se>
To:        Dave VanAuken <dave@hawk-systems.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: retrieve and delete remote file via ssh
Message-ID:  <3C1F004F.9F6A7A3A@resfeber.se>
References:  <DBEIKNMKGOBGNDHAAKGNAEPKKOAA.dave@hawk-systems.com>

next in thread | previous in thread | raw e-mail | index | archive | help
ssh user@host "rm $file"

should do it.


/Jon



Dave VanAuken wrote:
> 
> 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

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?3C1F004F.9F6A7A3A>