- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How do you check if file exists on remote system?
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
03-06-2001 06:35 AM
03-06-2001 06:35 AM
How do you check if file exists on remote system?
if [ -f //remotehost/tmp/HP* ]
then
echo "HP files found"
fi
or
if [ -f remotehost:/tmp/HP* ]
then
echo "HP files found"
fi
But neither work, can someone please help?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2001 06:46 AM
03-06-2001 06:46 AM
Re: How do you check if file exists on remote system?
#If the file, or files, are found then VAR1 will not equal 0
VAR1=`remsh remotesystem "ll /tmp/filename" | wc -l`
if [ VAR1 != 0 ]
then
echo "File(s) exist"
else
echo "File Not Found"
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2001 06:48 AM
03-06-2001 06:48 AM
Re: How do you check if file exists on remote system?
find / your_commands > first_server:/dir/output.file
Just a thought,
/rcw
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2001 06:58 AM
03-06-2001 06:58 AM
Re: How do you check if file exists on remote system?
ora_svr @ [/u01/app/oracle/admin]# more test.sh
VAR1=`remsh zakori "ll /tmp/doug" | wc -l`
if [ VAR1 != 0 ]
then
echo "File(s) exist"
else
echo "File Not Found"
fi
ora_svr @ [/u01/app/oracle/admin]# sh test.sh
/tmp/doug not found
File(s) exist
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2001 09:46 AM
03-06-2001 09:46 AM
Re: How do you check if file exists on remote system?
if [ $VAR1 != 0 ]