Solved

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

Posted on 2008-06-20
4
571 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
Comment Utility

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
Comment Utility
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
Comment Utility
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
Comment Utility
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.

763 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

10 Experts available now in Live!

Get 1:1 Help Now