[scponly] deleting remote files with wildcards ... ?

Paul Hyder Paul.Hyder at noaa.gov
Wed Aug 30 12:40:51 EDT 2006


Unfortunately the default behavior of scponly only expands wildcards in scp
commands.  Adding it to the allowable characters won't change that behavior.

The best solution I know of is to use sftp with a batch file.  It does it's
own wildcard expansion.
	Paul Hyder
	NOAA Earth System Research Laboratory, Global Systems Division
	Boulder, CO

Ensel Sharon wrote:
> So, I sent the following short email to freebsd-questions:
> 
> -----
> 
>> 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 at host rm -rf /some/testdir/*
>> ssh: No match.
>>
>> Then, these combinations of single and double
> quotes:                                                                                                       >
>> ssh user at host 'rm -rf /some/testdir/*'
>>
>> ssh user at host rm -rf '/some/testdir/*'
>>
>> ssh user at 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 ? 
> 
> 
> -----
> 
> And everyone there said my syntax was fine and it should be working ...
> 
> So is it scponly that is getting in the way ?
> 
> Dp I need to add a * to the allowable characters in scponly.h ?
> 
> Thanks.
> 
> 
> _______________________________________________
> scponly mailing list
> scponly at lists.ccs.neu.edu
> https://lists.ccs.neu.edu/bin/listinfo/scponly




More information about the scponly mailing list