deleting with wildcards over ssh ... how ?

Matteo Pillon matteo.pillon at gmail.com
Wed Aug 30 16:05:05 UTC 2006


On Wed, Aug 30, 2006 at 11:06:39AM -0400, Ensel Sharon wrote:
> I want to delete some remote files with a wildcard, running 'rm' over ssh.
> [...]
> So what is the _right_ way to do this ?

ssh user at host 'sh -c "rm -rf "/some/testdir/*"'

As * has to be expanded before is sent to rm.

Bye.

-- 
 * Pillon Matteo


More information about the freebsd-questions mailing list