The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Search for Files that DONT contain a string tonydsam UNIX for Dummies Questions & Answers 13 05-27-2009 01:19 AM
What is the Best way to search files for a string?? 35Soinc UNIX for Dummies Questions & Answers 15 03-25-2008 04:34 PM
change files permission on Remote machine almeisan1 Shell Programming and Scripting 1 10-05-2006 12:03 PM
Searching for files in Remote Machine matrixmadhan UNIX for Dummies Questions & Answers 0 06-21-2005 05:02 AM
Search all files for specific string sureshy UNIX for Dummies Questions & Answers 4 03-06-2002 12:28 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-14-2005
a_rivu a_rivu is offline
Registered User
  
 

Join Date: Jun 2005
Posts: 2
Search files for a string in the remote machine

Hi all,
I want to search the files in a remote machine for a particular string. The SSH command I wrote is giving an error even when the syntax is correct.
ssh user@hostmachine find . -name "*.txt" -exec grep "ARIVU" '{}' \;
The error it gives is find: missing argument to `-exec'

When the following command is executed on a local machine, it is working fine
find . -name "*.txt" -exec grep "ARIVU" '{}' \;

Please let me know where I'm wrong....
  #2 (permalink)  
Old 06-14-2005
DogDay's Avatar
DogDay DogDay is offline
Registered User
  
 

Join Date: Jun 2005
Location: /dev/null
Posts: 83
Quote:
Originally Posted by a_rivu
Hi all,
I want to search the files in a remote machine for a particular string. The SSH command I wrote is giving an error even when the syntax is correct.
ssh user@hostmachine find . -name "*.txt" -exec grep "ARIVU" '{}' \;
The error it gives is find: missing argument to `-exec'

When the following command is executed on a local machine, it is working fine
find . -name "*.txt" -exec grep "ARIVU" '{}' \;

Please let me know where I'm wrong....
Try quoting the command:

ssh user@hostname "find . -name "*.txt" -exec grep "ARIVU" '{}' \;"
  #3 (permalink)  
Old 06-14-2005
a_rivu a_rivu is offline
Registered User
  
 

Join Date: Jun 2005
Posts: 2
Thanx boss..... it works....
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:41 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0