Link to home
Start Free TrialLog in
Avatar of Devinder Singh Virdi
Devinder Singh VirdiFlag for United States of America

asked on

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

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.
Avatar of ghostdog74
ghostdog74


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

Open in new window

Avatar of omarfarid
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.
Avatar of Devinder Singh Virdi

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of omarfarid
omarfarid
Flag of United Arab Emirates image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial