Empty Remote Folder Via Shell Script

hsthompson

Registered
I want to empty a folder on a web server via shell script. My current code doesn't work.

Code:
rm myusername@ssh.mydomain.com:./public_html/images/*.*

What would be the correct way?
 
Howabout using ssh to execute a remote command?

Code:
ssh myusername@somesite.com 'rm ./public_html/images/*.* && exit'
 
Back
Top