Solved

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

Posted on 2008-06-20
4
572 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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.

911 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now