From owner-freebsd-questions@FreeBSD.ORG Tue Feb 6 22:42:39 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1FAC916A4D4 for ; Tue, 6 Feb 2007 22:42:39 +0000 (UTC) (envelope-from prestonh@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.248]) by mx1.freebsd.org (Postfix) with ESMTP id 7C90C13C504 for ; Tue, 6 Feb 2007 22:42:38 +0000 (UTC) (envelope-from prestonh@gmail.com) Received: by an-out-0708.google.com with SMTP id c24so23635ana for ; Tue, 06 Feb 2007 14:42:38 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=p8X+G3NHiLoVzVNo+eIH9gB4LwmhX/QnFGdiVCjMAeSQdZK1Ox4mSszW64pP7p+t4Vyfqa+Azl3Hm1TA6DmAOWwIBr9sU2jIhXqiXKXBFDhKBrOcfqbkXXdkbmli8UHiEImQ3jKaAPcsob0KT3FI87E3NCM7Qa4+EX4uunQaUOk= Received: by 10.114.58.1 with SMTP id g1mr905480waa.1170800217043; Tue, 06 Feb 2007 14:16:57 -0800 (PST) Received: by 10.114.124.10 with HTTP; Tue, 6 Feb 2007 14:16:57 -0800 (PST) Message-ID: <8f5897560702061416y564cb6fdsca3ca7f216c352d6@mail.gmail.com> Date: Tue, 6 Feb 2007 16:16:57 -0600 From: "Preston Hagar" To: freebsd-questions@freebsd.org In-Reply-To: <8f5897560702061416u423fb8ddu248ec686760a2ea5@mail.gmail.com> MIME-Version: 1.0 References: <005401c74a2b$30361b90$0300020a@mickey> <3B0782F6-FF0D-42AA-9497-450323607CFF@mac.com> <8f5897560702061416u423fb8ddu248ec686760a2ea5@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: SCP & Delete X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Feb 2007 22:42:39 -0000 > On 2/6/07, Chuck Swiger wrote: > > > > On Feb 6, 2007, at 3:12 PM, Don O'Neil wrote: > > > How do I delete a file after I've copied it with SCP? Is there some > > > sort of > > > secure 'rm' command? > > > > Use "rsync --delete" via SSH. (Danger! Slippery when wet! Use with > > caution.) > > > > -- > > -Chuck > > > I am not sure the rsync --delete is what the OP intended. rsync --delete > will delete the file on the remote location if it no longer exists in the > source location. The OP wanted to, as I understood it, delete the file from > the source location after it was copied to the remote location. Probably > the best bet would to be to have a script scp the files, do some sort of > verification that they made it intact, and then do an ssh user@host"/path/to/file" as suggested earlier. > > HTH, > > Preston > >