Solved

Before FTP, I want to see mount point and free space of remote box

Posted on 2008-06-20
4
575 Views
Last Modified: 2013-12-27
Hi,
I am working in very simple script in which i am transfering couple of files from source machine to target. For that I am using ftp in Sun-Solaris. I want to know free space availabe in target machine before transfering these files.
0
Comment
Question by:Devinder Singh Virdi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 9

Expert Comment

by:ghostdog74
ID: 21836424

ftp -v -n server.ip << EOF | awk '{print "filesystem: "$1, " Available: "$4}'
! df -k
bye
EOF

Open in new window

0
 
LVL 40

Expert Comment

by:omarfarid
ID: 21837068
before you ftp, you may run a remote command via ssh:

ssh user@remotesys "df -k"

then you may capture the out put and based on results, ftp to transfer files.
0
 
LVL 15

Author Comment

by:Devinder Singh Virdi
ID: 21838413
Hi Omarfarid,
Is there any way that system should not ask for password again and again, because i have to use this statement in loop. Sorry I am not Unix person.
0
 
LVL 40

Accepted Solution

by:
omarfarid earned 50 total points
ID: 21838595
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

697 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question