From owner-freebsd-questions@FreeBSD.ORG Wed Aug 30 15:23:40 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9631B16A4E1 for ; Wed, 30 Aug 2006 15:23:40 +0000 (UTC) (envelope-from webster@es.net) Received: from postal4.es.net (postal4.es.net [198.124.252.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id D4F2643D5C for ; Wed, 30 Aug 2006 15:23:39 +0000 (GMT) (envelope-from webster@es.net) Received: from adsl-63-206-71-69.dsl.snfc21.pacbell.net (adsl-63-206-71-69.dsl.snfc21.pacbell.net [63.206.71.69]) by postal4.es.net (Postal Node 4) with ASMTP (SSL) id IXB52125; Wed, 30 Aug 2006 08:23:25 -0700 Date: Wed, 30 Aug 2006 08:23:23 -0700 From: John Webster To: Ensel Sharon Message-ID: <6C58FC74160349B9812345B3@adsl-63-206-71-69.dsl.snfc21.pacbell.net> In-Reply-To: References: X-Mailer: Mulberry/3.1.6 (Linux/x86) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="==========E37B5B3BC00012D52323==========" Cc: freebsd-questions@freebsd.org Subject: Re: deleting with wildcards over ssh ... how ? 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: Wed, 30 Aug 2006 15:23:40 -0000 --==========E37B5B3BC00012D52323========== Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline --On Wednesday, August 30, 2006 11:06:39 -0400 Ensel Sharon wrote: > > I want to delete some remote files with a wildcard, running 'rm' over ssh. > > The obvious syntax doesn't work at all - it doesn't even make an ssh > connection - I think it is interpreting the wildcard locally: > ># ssh user@host rm -rf /some/testdir/* > ssh: No match. > > Then, these combinations of single and double quotes: > > ssh user@host 'rm -rf /some/testdir/*' > > ssh user@host rm -rf '/some/testdir/*' > > ssh user@host 'rm -rf "/some/testdir/*"' > > All connect over ssh, and produce no errors, but the remote files are > still there - nothing was deleted. > > So what is the _right_ way to do this ? > > Thanks. > How about: ssh user@host rm -rf /some/testdir/\* --==========E37B5B3BC00012D52323========== Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (FreeBSD) iD8DBQFE9a1sBf+aYL5/Y60RAmZSAJsEtnvQoPOC9TNWu23zXYPnlIP7rACfYJ0D cJG1qaIn8a5cKPdaQflGeeU= =lMV3 -----END PGP SIGNATURE----- --==========E37B5B3BC00012D52323==========--