- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- find files on remote server
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2001 12:30 PM
06-06-2001 12:30 PM
Is it possible to search for files remotely on HPUX 11.0 servers? I am currently writing a version control menu that will automatically move files from a development server, to a production server.
What I want to do is write a script to prompt a user for a filename on the production server, remotely search the development server for the file, and then ftp the file to the production server.
If there is no remote search command, I have a few ideas on how to get around this, though additional ideas would be more than welcome.
Thanks
Youlette
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2001 12:39 PM
06-06-2001 12:39 PM
Solutionfile_exists = `remsh remote_sys 'find /dir/to/look/in -name file_to_find | wc -l'`
if ( $file_exists > 0 )
then
the file exists on remote system - do appropriate action
else
the file doesn't exist on remote system - do appropriate action
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2001 12:47 PM
06-06-2001 12:47 PM
Re: find files on remote server
I would do it using a combination of remsh, find, rcp, e.g.
REMHOST=bugs
echo "Enter desired file: \c"
read F
TFILE=/tmp/xx${$}
remsh ${REMHOST} find / -name "${F}" > $TFILE
if [ -s ${TFILE} ]
then
while read X
do
rcp -p ${REMHOST}:${X} ${X}
done
fi
rm -f $TFILE
This should be a good starting point. rcp is easier to use in scripts than ftp.
man remsh,rcp,find for details.
Regards, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2001 12:49 PM
06-06-2001 12:49 PM
Re: find files on remote server
That should be:
cat ${TFILE} | while read X
do
.....
done
Sorry about that, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2001 01:04 PM
06-06-2001 01:04 PM
Re: find files on remote server
I was thinking along the same lines as Patrick and Clay, though I have not begun scripting yet. These will work very nicely.
Thanks
Youlette
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2001 07:00 AM
06-07-2001 07:00 AM
Re: find files on remote server
Using remsh presumes you?ve already configured equivalent hosts. You can also use:
rexec host [ -l login ] [ -n ] command
instead of:
remsh host [-l username] [-n] command
rexec prompts for a password before executing the command instead of using hosts.equiv for authentication.
Regards.