The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
openssh to ssh2 interoperability porter Security 2 12-03-2007 09:06 AM
ssh2 & sftp help tansha UNIX for Dummies Questions & Answers 11 06-28-2006 12:39 PM
SSH2 help !!!! tansha AIX 2 06-22-2006 08:43 AM
ssh2 troubles PaulC UNIX for Dummies Questions & Answers 5 03-07-2006 02:10 AM
ssh2: .profile not set correctly dangral UNIX for Dummies Questions & Answers 0 05-13-2004 09:07 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 02-21-2006
Registered User
 

Join Date: Feb 2006
Location: India
Posts: 1
Exclamation Can't Delete File using ssh2

hi,

i am getting error while executing the follwoing command.

/usr/local/bin/ssh2 user@hostname find /test/DeleteFile -mtime +10 -exec rm {} \;

error is :
find: 0652-018 An expression term lacks a required parameter.

it is deleting the files from the specified location. it is working properly if i write it in script and execute that script. it is deleting the files.
but not working if i execute the same command directly to shall prompt.

there is no Permission or Access Rights problem on folders and user.
Reply With Quote
Forum Sponsor
  #2  
Old 03-21-2006
Registered User
 

Join Date: Jul 2005
Location: Mt. Prospect, Illinois
Posts: 32
Thumbs up

I'm suggesting using the single backtick character before and after the "find" command. The character I suggest using is located in the upper left of the
keyboard ( usually ) located on the same key as the tilde "~" character.

Good Luck!
Reply With Quote
  #3  
Old 03-22-2006
Registered User
 

Join Date: Oct 2002
Posts: 676
Code:
/usr/local/bin/ssh2 user@hostname "find /test/DeleteFile -mtime +10 -exec rm {} \;"
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 03:45 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0