Date: Wed, 30 Aug 2006 08:23:23 -0700 From: John Webster <jwebster@es.net> To: Ensel Sharon <user@dhp.com> Cc: freebsd-questions@freebsd.org Subject: Re: deleting with wildcards over ssh ... how ? Message-ID: <6C58FC74160349B9812345B3@adsl-63-206-71-69.dsl.snfc21.pacbell.net> In-Reply-To: <Pine.LNX.4.21.0608301059480.31959-100000@shell.dhp.com> References: <Pine.LNX.4.21.0608301059480.31959-100000@shell.dhp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--==========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 <user@dhp.com> 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==========--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6C58FC74160349B9812345B3>