Solved

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

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Virtualizing TAPE on dual VIOS 3 101
UNIX SCP 5 82
Solaris 4.1.3 cloning and booting 13 83
Wrap Oraccle SQL*Plus executable Command 4 94
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…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

790 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