Sponsored Content
Top Forums Shell Programming and Scripting Find not finding stuff if run remotely Post 302895388 by bitlord on Monday 31st of March 2014 03:06:08 PM
Old 03-31-2014
Find not finding stuff if run remotely

Hello
I'm working on script to find tomcat on all my servers. Then find out what version of tomcat is installed. Basically I want to check and see if the latest version is installed. I'm testing the script on Solaris 10. I'm also going to need it to work on RHEL and SLES.

If I run the following find command remotely, It doesn't find the file. If I run it on the server locally it it finds this file: /usr/serena/vm/common/tomcat/bin/version.sh

Local command
Code:
sudo find / \( -name 10_Recommended* -o -name share \) -prune -o -type f -name version.sh -print 2>/dev/null


The script

Code:
for s in `cat sol`
do echo $s
ssh -q  $s sudo find / \( -name 10_Recommended* -o -name share \) -prune -o -type f -name version.sh -print 2>/dev/null
done

Can someone tell me why this is happening?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Finding out how long a command takes to run

Hi I am trying to find out the best way to find out how long a command takes to run in miliseconds .. Is there such a way of doing this in Unix ? Thanks (3 Replies)
Discussion started by: cfoxwell
3 Replies

2. Shell Programming and Scripting

find - finding files.

I understand that to find a type of file using command find I could do "find -type f -name \*.htm -print". However, I wish to find all files BUT *.htm. Can I negate the search somehow? Again, I have peeked into the man files etc... If anyone has an answer, Thanks in Advance! (3 Replies)
Discussion started by: gsjf
3 Replies

3. Shell Programming and Scripting

Finding your current run lvl

The title says it all really. I am writing a shell script for a Linux box, and I have recently run into a problem. I need to make sure I am at a certain run level first. Hence, the question. How can I find out what run level the box is currently running at? Is there a system variable... (2 Replies)
Discussion started by: Scripting Newb
2 Replies

4. UNIX for Dummies Questions & Answers

Exit from telnet when run Remotely

ssh user@host -q -n 'grep `hostname` /etc/hosts; telnet 10.100.23.45 1234;' When i run this command remotely it is hanging and not giving me the prompt, Can anyone tell me how can I exit a telnet command remotely please. Thanks. (10 Replies)
Discussion started by: venu_nbk
10 Replies

5. Shell Programming and Scripting

how to avoid space to run remotely

If I run the following command remotely after ssh than it works fine su - oracle -c "/oracle/product/102/db/bin/dbshut" But If I run the following command it doesn't work su - oracle -c "/oracle/product/102/db/bin/lsnrctl stop" Because I think there is a space is present between lsnrctl and... (1 Reply)
Discussion started by: madhusmita
1 Replies

6. Shell Programming and Scripting

help needed. run shell scipt remotely

Dear all , I have a script. this script called get.sh and can get some solaris infomation and save the result as result.tar.gz. the problem is : we have 12 servers. every time. I need to login 12 server and do the same job 12 times.:mad: master server ... (2 Replies)
Discussion started by: chinesefish
2 Replies

7. Shell Programming and Scripting

howto run remotely call function from within script

Hi I have the following script : #!/bin/ksh #################### Function macAddressFinder ######################## macAddressFinder() { `ifconfig -a > ipInterfaces` `cat ipInterfaces` } ####################################################################### # # print... (2 Replies)
Discussion started by: presul
2 Replies

8. Shell Programming and Scripting

Create a list of commands in a central location, and then run them all remotely through a ssh here

I'm trying to write a script that in the end will from one central location hop to a bunch of servers and then run a series of ping tests. The thing is, the list of devices that needs to be pinged is going to be different for each server. So what I want to do is be able to do is read through the... (0 Replies)
Discussion started by: DeCoTwc
0 Replies

9. UNIX for Advanced & Expert Users

Finding the hardware model name remotely

First, forgive me if this is a stupid questions that I should have asked in the non-expert forum. It seems like a hard questions to me. Is there a way to find the hardware model name from the command line on UNIX machines in general? I want to find out what kind of machines are running at a... (5 Replies)
Discussion started by: Pug
5 Replies

10. Shell Programming and Scripting

Run yes/no script remotely

I have this script in server2 # cat /root/yesno.sh #!/bin/bash read -p "are you sure?" -n 1 -r if $ ]]; then echo "" echo "YES" else echo "NO" fi # sh /root/yesno.sh are you sure?y YES (5 Replies)
Discussion started by: anil510
5 Replies
gst-typefind-0.8(1)						   User Commands					       gst-typefind-0.8(1)

NAME
gst-typefind-0.8, gst-typefind - print MIME type of file SYNOPSIS
gst-typefind-0.8 [gst-std-options] file [file...] gst-typefind [gst-std-options] [--gst-list-mm] [--gst-mm=string] [--print] file [file...] DESCRIPTION
gst-typefind-0.8 uses the GStreamer type-finding system to determine the GStreamer type of the given file(s). gst-typefind is a wrapper script that runs the latest installed version of gst-typefind-X.X. For example, if both gst-typefind-0.7 and gst- typefind-0.8 are installed on your system, gst-typefind runs gst-typefind-0.8. OPTIONS
The following options are supported by gst-typefind-0.8 and gst-typefind: gst-std-options Standard options available for use with most GStreamer applications. See gst-std-options(5) for more information. The following options are supported by gst-typefind only: --gst-list-mm List found major/minor versions. This option displays the versions that are available. --gst-mm=string Force major/minor version. This option enables you to specify a specific version to run, if you do not want to run the default version. --print Print wrapped command line. This option displays the command that will be run, and then runs the command. OPERANDS
The following operands are supported: file Name of file for which you want to find the MIME type. EXAMPLES
Example 1: Identifying the MIME Type of file.ogg example% gst-typefind-0.8 file.ogg file.ogg - application/ogg Example 2: Running the Wrapper Script and Displaying the Command Name example% gst-typefind --print /usr/bin/gst-typefind-0.8 FILES
The following files are used by this application: /usr/bin/gst-typefind-0.Executable to print MIME type of file /usr/bin/gst-typefind Wrapper script that runs the latest installed version of gst-typefind-X.X ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-media | +-----------------------------+-----------------------------+ |Interface stability |External | +-----------------------------+-----------------------------+ SEE ALSO
gst-complete(1), gst-compprep(1), gst-feedback(1), gst-inspect(1), gst-launch(1), gst-launch-ext(1), gst-md5sum(1), gst-register(1), gst- thumbnail(1), gst-xmlinspect(1), gst-xmllaunch(1), gstreamer-properties(1), libgstreamer-0.8(3), libgstgetbits(3), gst-std-options(5) NOTES
Original man page written by the GStreamer team at http://gstreamer.net/. Updated by Brian Cameron, Sun Microsystems Inc., 2004. SunOS 5.10 14 Oct 2004 gst-typefind-0.8(1)
All times are GMT -4. The time now is 02:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy