07-09-2008
problem with ftp:
i have got 2 servers in unix(IBM AIX 5.3) namely below.
test1
production1
i m trying to do ftp from test1 to production1.
------------------------------------------------------------
below the script called naveed1.sh which lies in test1,also it have two files called
n1.txt----------->contains the username and password for login into production1.also what action i m performing in production1
ni_log.log-------->contains info abt ftp.
-----------------------------------------------------------------------
contents of naveed1.sh:
#!/bin/ksh
ftp -nv production1< test1/n1.txt > test1/ni_log.log
echo bye
--------------------------------------------------------------------
contents of n1.txt:
user gumian bull423
cd production1/AMIS_Scripts
cat rv1.sh | wc -l
-------------------------------------------------------
when i execute the script naveed1.sh it establishes the ftp but it fails in the part
cat rv1.sh | wc -l
till cd production1/AMIS_Scripts it works fine. can any one help me out.
-------------------------------------------------------------------
my requirement is to execute a script in test1 and then do ftp to production1 and then go to a particular dir and get the wc of a file called rv1.sh
-----------------------------------------------------------------------
below the contents of ni_log.log:
Connected to production1
220 production1 FTP server (Version 4.2 Tue Nov 14 12:49:19 CST 2006) ready.
331 Password required for gumian.
230-Last unsuccessful login: Tue Jul 8 06:45:34 2008 on ssh from 10.48.154.63
230-Last login: Wed Jul 9 04:24:28 2008 on ssh from 10.48.154.63
230 User gumian logged in.
250 CWD command successful.
?Invalid command
221 Goodbye.
--------------------------------------------------------------------
10 More Discussions You Might Find Interesting
1. UNIX Desktop Questions & Answers
I use FTP in a shell script to transfer the files to a remote server.
Sometimes the program hangs without returning any errors
after the command
ftp server_name
How do you detect from within the shell that something is wrong?
How do you trap the errors returned by ftp command?
Any help... (3 Replies)
Discussion started by: marusia
3 Replies
2. UNIX for Dummies Questions & Answers
can someone tell me how I can deal with a problem am having concerning users that are faliing to use one of the shells specified in the /etc/shells file.
as a result, am told, these users are bound fail to connect via FTP. i know i goto check the /etc/shells file on the target host but what... (5 Replies)
Discussion started by: TRUEST
5 Replies
3. Shell Programming and Scripting
hi i have written a shell to automate the ftp process for the particular file.iam getting errors when try to ftp it.And i am cant get why the lcd is not being taken properly as it is taking during runtime.can anyone give me a solution
here its my code
DATE=`date '+%d_%m_%Y'`... (1 Reply)
Discussion started by: cskumar
1 Replies
4. Solaris
Hi Guys,
Got problem when I tried to get files from Solaris server to my PC. The connection transfer was using FTP and the connection was made from the solaris server to my PC. Here's what happened when the file transfer being made:
# ftp 10.192.23.230
Connected to 10.192.23.230.
220... (9 Replies)
Discussion started by: raskita
9 Replies
5. HP-UX
We recently moved offices and checked our network ID. I have configured all the files that I am familiar with and am able to telnet and ping from my pc but I am unable to ftp. Any suggestions...Thanks (5 Replies)
Discussion started by: andrewd
5 Replies
6. Shell Programming and Scripting
i m able to login to Unix box from window's cmd
can anyone tell me how to run a script from window cmd using ftp ?
the script is in unix box and i need to run from windows CMD using ftp (2 Replies)
Discussion started by: ali560045
2 Replies
7. Shell Programming and Scripting
Hello experts,
I've got the following script that is supposed to FTP a file to another box.
#!/usr/bin/ksh
while read line
do
HOST=`echo "$line" | cut -d" " -f1`
USER=`echo "$line" | cut -d" " -f2`
PASSWD=`echo "$line" | cut -d" " -f3`
PATH=`echo "$line" | cut -d" " -f4`
done <... (5 Replies)
Discussion started by: King Nothing
5 Replies
8. Shell Programming and Scripting
Hello,
I have a very simple script that put a file in server ftp
#!/bin/bash
var="ITW-trail-templiers-samedi"
cd /Users/$USER/Desktop
ftp -n >&1 << EOF
open server
quote user "user"
cd oberon
binary
put "$var"
bye
EOF
I have error :
200 Type set to IMAGE.
remote:... (2 Replies)
Discussion started by: protocomm
2 Replies
9. Red Hat
Dear All
I cannot ftp to my RedHat server from MS Windows machine ,but ping and telnet are ok. I checked as the following :
#chkconfig tftp on
#setup
After enabling tftp service, still the ftp is not ok but ping & telnet are ok. Can you please help me?
Thank you (8 Replies)
Discussion started by: hadimotamedi
8 Replies
10. Shell Programming and Scripting
Hi,
I have a problem when i want to get a filename from an ftp server when a space is before his name.
example: "spacetestFile"
The ftp server return an error "no asset or no permission" though the file exist ?
Why it behave in this way ? (8 Replies)
Discussion started by: protocomm
8 Replies
LEARN ABOUT DEBIAN
bup-restore
bup-restore(1) General Commands Manual bup-restore(1)
NAME
bup-restore - extract files from a backup set
SYNOPSIS
bup restore [--outdir=outdir] [-v] [-q]
DESCRIPTION
bup restore extracts files from a backup set (created with bup-save(1)) to the local filesystem.
The specified paths are of the form /branch/revision/path/to/file. The components of the path are as follows:
branch the name of the backup set to restore from; this corresponds to the --name (-n) option to bup save.
revision
the revision of the backup set to restore. The revision latest is always the most recent backup on the given branch. You can dis-
cover other revisions using bup ls /branch.
/path/to/file
the original absolute filesystem path to the file you want to restore. For example, /etc/passwd.
Note: if the /path/to/file is a directory, bup restore will restore that directory as well as recursively restoring all its contents.
If /path/to/file is a directory ending in a slash (ie. /path/to/dir/), bup restore will restore the children of that directory directly to
the current directory (or the --outdir). If the directory does not end in a slash, the children will be restored to a subdirectory of the
current directory. See the EXAMPLES section to see how this works.
OPTIONS
-C, --outdir=outdir
create and change to directory outdir before extracting the files.
-v, --verbose
increase log output. Given once, prints every directory as it is restored; given twice, prints every file and directory.
-q, --quiet
don't show the progress meter. Normally, is stderr is a tty, a progress display is printed that shows the total number of files
restored.
EXAMPLE
Create a simple test backup set:
$ bup index -u /etc
$ bup save -n mybackup /etc/passwd /etc/profile
Restore just one file:
$ bup restore /mybackup/latest/etc/passwd
Restoring: 1, done.
$ ls -l passwd
-rw-r--r-- 1 apenwarr apenwarr 1478 2010-09-08 03:06 passwd
Restore the whole directory (no trailing slash):
$ bup restore -C test1 /mybackup/latest/etc
Restoring: 3, done.
$ find test1
test1
test1/etc
test1/etc/passwd
test1/etc/profile
Restore the whole directory (trailing slash):
$ bup restore -C test2 /mybackup/latest/etc/
Restoring: 2, done.
$ find test2
test2
test2/passwd
test2/profile
SEE ALSO
bup-save(1), bup-ftp(1), bup-fuse(1), bup-web(1)
BUP
Part of the bup(1) suite.
AUTHORS
Avery Pennarun <apenwarr@gmail.com>.
Bup unknown- bup-restore(1)