Solved

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

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

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…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
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.

786 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