#!/bin/bash
#ftp safar
host='xxxxxxxx'
user='xxx'
pass='xxx'
remoteDIR="$1"
echo $remoteDIR
remotedir=$remoteDIR
rm -rf file.txt dir.txt
function getlist
{
ftp -nv $host << a="`echo" a = "d">> ./dir.txt
else
echo "file $d"
echo $d | awk '{print $9}' >> ./file.txt
fi
done < ./remote.txt
}
function getfile
{
while read f
do
ftp -nv $host << X
user $user $pass
lcd tesftp
cd $remoteDIR
asc
get $f
bye
X
done < file.txt
}
getlist
checkfile
getfile
exit 0
Thursday, April 17, 2008
ftp get files from remote dir
get all remote files trough ftp connection,ascii in this case,just change the asc to bin for binary transfer
Related Posts (ajax)
Labels
3g
aaa
Ajax
all leagues
belajar
billing
books
cdma
cdr
cisco
evdo
friends
google
gsm
hspda
hsupa
ims
indonesia
IP
islam
jquery
kpi
leadership
linux
lte
map
mediasi
mml
monitor
moshell
mpls
network
nokia
omc
oracle
oss
paging
parma
performance
perl
players
politics
pstn
radio
script
shell scipt
siemens
signalling
songs
story
switching
telecom
tips
tools
umts
voip
wimax
windows
0 Comment :
Post a Comment