|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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.... |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
Quote:
ssh user@hostname "find . -name "*.txt" -exec grep "ARIVU" '{}' \;" |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Thanx boss..... it works....
|
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with search string between two files | greet_sed | Shell Programming and Scripting | 5 | 03-06-2012 03:25 AM |
| script to delete multiple files in remote machine | vkalya | Shell Programming and Scripting | 1 | 03-19-2011 07:30 PM |
| To find the LATEST file from a dir on REMOTE machine and SCP to local machine? | me_ub | Red Hat | 3 | 07-08-2009 12:57 AM |
| 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 |
|
|