# Empty Remote Folder Via Shell Script



## hsthompson (Jul 1, 2008)

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


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

What would be the correct way?


----------



## ElDiabloConCaca (Jul 1, 2008)

Howabout using ssh to execute a remote command?


```
ssh myusername@somesite.com 'rm ./public_html/images/*.* && exit'
```


----------



## Lihualee (Sep 29, 2008)

bump up ..


----------

