error in a remote find


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers error in a remote find
# 1  
Old 05-29-2006
error in a remote find

2 AIX servers (AIX 5.3). From local server, I need to manage remote files. But I have some errors with find :
# rsh remoteserver find /directory -name filename
is OK : I can see the remote file
BUT :
# rsh remoteserver find /directory -name filename -exec ls -l {} \;
fails : I have :
find : 0652-018 Il manque un paramètre requis dans un terme de l'expression.
(something like : A parameter required in a term of the expression is missing)

What can I do ?
Thank you in advance
# 2  
Old 05-29-2006
Does "filename" have any embedded metacharacters or spaces? The error is a complaint about find syntax.
# 3  
Old 05-29-2006
The errors seems to be in the -exec part :
This command is OK :
# rsh aixtes find /ora50/DEOPCA2 -name DEOPCA_1_2048.dbf
The answer is OK :
/ora50/DEOPCA2/DEOPCA_1_2048.dbf

This command is wrong :
#rsh aixtes find /ora50/DEOPCA2 -name DEOPCA_1_2048.dbf -exec ls -l {} \;
The answer is :
find : 0652-018 Il manque un paramètre requis dans un terme de l'expression.

I try the same commands with a brand new file I have just created : /ora50/DEOPCA2/stuff. I have exactly the same answers.

I suppose I have to do some changes around "{} \;" because I run it through rsh, but I don't see what.

Regards
# 4  
Old 05-29-2006
OKKKKKKKKKK !!!!
As I wrote in the reply : "... around "{} \;" ...", I thought I could try a new command :
#rsh aixtes find /ora50/DEOPCA2 -name stuff -exec ls -l "{} \;"
And the answer is OK :
-rw-r--r-- 1 oramgr dba 0 29 mai 14:21 /ora50/DEOPCA2/stuff
You can consider this post as closed !
# 5  
Old 05-29-2006
send the command string as a quoted string

Code:
rsh aixtes "find /ora50/DEOPCA2 -name stuff -exec ls -l {} \;"

or as
Code:
rsh aixtes "find /ora50/DEOPCA2 -name stuff | xargs ls -l"

# 6  
Old 05-29-2006
Thank you, that's good for me
Regards
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script connect to remote server, not find files and exit only from remote server, but not from scrip

I have a script, which connecting to remote server and first checks, if the files are there by timestamp. If not I want the script exit without error. Below is a code TARFILE=${NAME}.tar TARGZFILE=${NAME}.tar.gz ssh ${DESTSERVNAME} 'cd /export/home/iciprod/download/let/monthly;... (3 Replies)
Discussion started by: digioleg54
3 Replies

2. Shell Programming and Scripting

Error when connecting to remote server to find files with timestamp today's day

I am connecting to remote server and try to check if files with timestamp as Today's day are on the directory. Below is my code TARFILE=${NAME}.tar TARGZFILE=${NAME}.tar.gz ssh ${DESTSERVNAME} 'cd /export/home/iciprod/download/let/monthly; Today=`date +%Y%m%d`; if ;then echo "We... (1 Reply)
Discussion started by: digioleg54
1 Replies

3. UNIX for Advanced & Expert Users

How to find remote IP addresses that applications are scanning them?

Hi, I have a web server running on Debian 6.0.4 in a computer outside my university, but the web URL is blocked by my university, the security group of the university said because it was scanning computers inside university. I could not find any applications in my web server are doing... (3 Replies)
Discussion started by: hce
3 Replies

4. Shell Programming and Scripting

Find the remote server status.

Hi All, I would like to connect from "Instance A" to "Instance B" with the help of sftp. Where as Instance B is having clustered servers ( 2 servers pointing same instance ). Now, my question is before connecting to "Instance B" from "Instance A" how do know whether server is running or not.... (3 Replies)
Discussion started by: Girish19
3 Replies

5. UNIX for Dummies Questions & Answers

Find the latest file on remote sftp

Hi All, I need your help in finding the latest files in remote sftp and get those files to local server and process them. Please let me know I appreciate your valuable inputs. Thanks raj (7 Replies)
Discussion started by: rajeevm
7 Replies

6. IP Networking

How to find if remote n/w port is listening on HP-UX from the binary

Hi, I have an executable running on HP-UX, from this executable I need to findout if the portnumber. lets say 7890,7891, 7892 are listening on the remote server running on HP-UX. I can do it by creating socket, connect etc. But is there any other way of doing it using "system()" function or... (3 Replies)
Discussion started by: einsteinBrain
3 Replies

7. Shell Programming and Scripting

Remote if find call failing

Hi folks. I know this is going to be one of those ones where I just need to stick a bracket or a single quote somewhere to fix, but it's killing me to try and work out why it's failing. This is the part of my script that isn't working properly: ssh serverx "touch -t $(date... (2 Replies)
Discussion started by: dlam
2 Replies

8. Shell Programming and Scripting

remote execution of find -exec

Hi folks I am working on a script which lists files of a specific pattern on a remote m/c and tar&zip them to another remote m/c via a centralized server. M/C details: remote1 - OSF1 vayu V5.1 2650 alpha remote2 - cygwin based windows server central - SunOS phys-chenab 5.8... (2 Replies)
Discussion started by: royalbull
2 Replies

9. UNIX for Advanced & Expert Users

how to find out if a port is available on a remote machine?

hi, I can ping into another unix machine, but I cannot seem to access a certain application. I think it might be because I am now allowed to connect to the port (because of firewall configuration). How can I find out if I have access to a port on another machine? thanks (2 Replies)
Discussion started by: JamesByars
2 Replies

10. Shell Programming and Scripting

cygwin and remote find command problem

Sir, I want to get all the files in directory on a remote server which are dated newer than a specified file. I have ssh running and the command I am using is : for file_name in `ssh userid@IP find "/cygdrive/d/oracle/oradata/db/archive" -newer "1_44.DBF" -name '*.DBF' -type f -print | xargs -r... (2 Replies)
Discussion started by: nakod1
2 Replies
Login or Register to Ask a Question