image
image

Go Back   macosx.com > Mac Help Forums > Unix & X11

Reply
 
Thread Tools
  #1  
Old July 1st, 2008, 06:11 PM
Registered User
 
Join Date: Mar 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
hsthompson is on a distinguished road
Empty Remote Folder Via Shell Script

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?
Reply With Quote
  #2  
Old July 1st, 2008, 09:03 PM
ElDiabloConCaca's Avatar
U.S.D.A. Prime
 
Join Date: Aug 2001
Location: San Antonio, Texas
Posts: 9,905
Thanks: 2
Thanked 61 Times in 57 Posts
ElDiabloConCaca has a spectacular aura aboutElDiabloConCaca has a spectacular aura aboutElDiabloConCaca has a spectacular aura about
Howabout using ssh to execute a remote command?

Code:
ssh myusername@somesite.com 'rm ./public_html/images/*.* && exit'
__________________
Power Macintosh G4/500MHz "Yikes!" 10.4.11 Server • 1024MB • 3 x 120GB + 320GB • DVR-111D • 2 x Radeon 7000 PCI • 2 x 17" CRT
MacBook 2.0GHz Core 2 Duo - White 10.5.5 • 2048MB • 80GB • CD-RW/DVD-ROM
iPod Photo 60GB • iPod nano 1GB • AT&T DSL 6Mb/768k
http://www.jeffhoppe.com
Reply With Quote
  #3  
Old September 29th, 2008, 08:49 AM
Registered User
 
Join Date: Sep 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Lihualee is on a distinguished road
Smile Good health

bump up ..
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 01:31 AM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.