10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to delete old file in ftp server, after transferring new file successfully .
but here i am checking both the file available or not using ls command.
if both the file available means i need to get file_new and file_old file size as greater than zero.
but i am getting only for... (3 Replies)
Discussion started by: elango963
3 Replies
2. SCO
Hi, (i'm sorry for my english)
I'm a problem on boot sco unix 5.0.5 open server.
this stop at "Checking protected password and checking subsystem databases"
(See this image )
I'm try this:
1) http://www.digipedia.pl/usenet/thread/50/37093/#post37094
2) SCO: SCO Unix - Server hangs... (9 Replies)
Discussion started by: buji
9 Replies
3. HP-UX
Hello All,
I am trying to connect to ftp server and get the files. Also i need to rename the file in other ftp dir.
rename method is not allowing me to rename the file in other dir. When i tried copy command by using net::FTP:FILE then perl says it is not installed.
Can some body help me to... (2 Replies)
Discussion started by: krsnadasa
2 Replies
4. HP-UX
Hi Members,
Can members please advise or suggest how to write UNIX script which
move all zip files in source directory and when done delete zip files from source directory? We want to delete only on successful transfer to the destination. secondly want to add some error checking if the FTP... (1 Reply)
Discussion started by: dxj0815
1 Replies
5. Shell Programming and Scripting
Hi
I am doing a FTP process through which I am copying a file from my local server to Remote server. After this I want to check the size of the file
Below is my program:
LOCALDIR=/batch/ediprocess
REMOTESERVER=test.appl.com
REMOTEPATH=batch/ftpTest
LOGIN=px
PASSWORD=abcd
ftp -n... (3 Replies)
Discussion started by: shanth_chandra
3 Replies
6. Shell Programming and Scripting
Hi,
I have a situation where I'm downloading multiple files from a remote system and I need to start a process after all the files are downloaded completely. How can I achieve it.
Eg.
I have 6 files, file1, file2, file3.... file6. I need to start a script scrpt1 after all the files have... (4 Replies)
Discussion started by: bornon2303
4 Replies
7. Shell Programming and Scripting
Hi ,
I want to write a FTP Script which checks the No of Vesions of the files in Archive Dir and if count >= 8 Delete the oldest file from the Archive Dir and if the count is <= 8 Move the file to the Archive Dir with a CurrentDate concatenation and FTP the file to the FTP directory and send... (1 Reply)
Discussion started by: kailash.jadhav
1 Replies
8. UNIX for Dummies Questions & Answers
I am having a requirement to check whether files were there in the ftp location and if the files were not there then need to send a mail to someone.Suppose there were files like A,B,C,D,etc.. if the file A was not there then mail to someone similarly for all the files.
Thanks for your help.
... (2 Replies)
Discussion started by: nimu1979
2 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I m new to unix and I need a help in FTp-ing a file.
My script is given below
ftp -n <<END_SCRIPT
open $FTP_HOST
user $FTP_USER $FTP_PASSWD
lcd $TEMPFOLDER
cd $FTP_LOCATION
put $1
bye
END_SCRIPT
exit_status=$?
if ; then
log "successfully FTPed the file"
else... (5 Replies)
Discussion started by: MeeraNair
5 Replies
10. UNIX for Dummies Questions & Answers
I have automated my ftp session as given in on of the previous threads as:
#! /usr/bin/ksh
HOST=remote.host.name
USER=whoever
PASSWD=whatever
exec 4>&1
ftp -nv >&4 2>&4 |&
print -p open $HOST
print -p user $USER $PASSWD
print -p cd directory
print -p binary
print -p get xyz
wait... (3 Replies)
Discussion started by: jithinravi
3 Replies
FTP-UPLOAD(1p) User Contributed Perl Documentation FTP-UPLOAD(1p)
NAME
ftp-upload - batch transfer local files to an FTP server
SYNOPSIS
ftp-upload [any-switch]... {[repeatable-switch]... file...}...
DESCRIPTION
ftp-upload is used to send local files to an FTP server. It isn't interactive, it's meant to be used from scripts. It is disciplined
about its exit value and it doesn't output informational messages by default.
There are two kinds of switches. Initial switches have to appear before any filenames, they affect the session as a whole. Repeatable
switches can appear interspersed with the file names, they affect the transfer of the files which appear after them on the command line.
OPTIONS
Initial switches
These have to be used before any file names listed on the command line.
--debug
Turn debugging on.
--help
Show the usage message and die.
--ignore-quit-failure
Don't complain or set a failure exit code just because the QUIT command fails. This can be necessary because some servers, in blatant
disregard of RFC 959, close the command channel when you send them an ABOR command.
-v, --verbose
Print informational messages to stdout.
--version
Show the version number and exit.
Initial switches which specify connection information
These also have to be used before any file names listed on the command line. They specify the information used to set up the FTP connec-
tion.
--account account
This specifies the account to be used when logging into the remote system. This is distinct from the user name used to log in. Few
systems need this. There is no default.
-h, --host host
Specify the host to which to connect. There is no default, you have to specify this switch.
--passive
Force the use of passive (PASV) transfers. Passive transfers are required with some firewall configurations, but if you have such
you'd do better to configure Net::FTP so that it knows when to use them (see Net::Config). If you need to use passive transfers with
certain (broken) servers, however, this switch is your best bet. Alternatively, you can set $FTP_PASSIVE to 1 in the environment (see
Net::FTP).
--password pw
This gives the password which will be used to login. The default is your email address.
Note that you should not specify a real (secret) password this way, as on most systems anybody on the machine can see the arguments you
pass to your commands. Use one of other password-setting switches instead.
-s, --password-stdin
This tells ftp-upload to read the password from standard input. No prompt will be printed, and a single line will be read. Most peo-
ple will use this switch to specify the password. Eg,
echo 3x9sjJJh | ftp-upload -sh $host -u $user $file
Using echo this way is safe where the --password switch isn't if the echo command is built in to the shell.
--password-fd fd
This is like --password-stdin except that it reads the password from the file descriptor numbered fd.
ftp-upload -h $host -u $user --password-fd=3 3<$pw_file $file
-u, --user user
Specify the user name to use when logging in. The default is "anonymous".
Repeatable switches
These switches can be used anywhere on the command line (except after the last file name). They affect the transfer of files listed after
them.
--as remote-name
Normally a file is transferred using the same name it has locally. If you use this switch the next file transferred will be called
remote-name on the other host instead.
ftp-upload --host $host --as index.htm index.html
-a, --ascii
Perform transfers in ASCII mode.
-b, --binary
Perform transfers in binary mode. This is the default.
-d, --dir dir
Change directory to dir on the FTP server before continuing. You can use this multiple times between files, ftp-upload will chdir once
for each time you specify it. Using ".." as the dir will cause an FTP "CDUP" to be done rather than a "CWD".
--full-path
Normally uploaded files go into the current directory on the remote host, even when the local file name given contains slashes. Eg, if
you say
ftp-upload -h $host /etc/motd
ftp-upload will upload the file as motd, not /etc/motd. This differs from how the standard ftp program works, and it also differs with
how ftp-upload worked before version 1.3.
If you specify --full-path, you'll get the other behavior. A request to upload dir/file will tell the server to store dir/file rather
than file.
When you use --as the --full-path setting doesn't matter. --full-path only tells the program what name to use when it's choosing the
name.
--no-full-path
Disable --full-path. This is the default.
-l, --ls
Try to get a remote directory listing of files after transferring them. I say "try" because there's no guaranteed way to do this with
the FTP protocol. The command I run is "LIST file". This will generally work if file doesn't contain any special characters.
-L, --no-ls
Disable the --ls behavior.
--tmp-none
Transfer files directly, don't do anything special to try to ensure that they don't appear under their real names on the remote machine
until the transfer is finished. Each file is transferred with a single simple "STOR". This is the default.
--tmp-samedir
Transfer files to the remote machine using a temporary name, then rename them when the transfer finishes. This won't work if the
remote server doesn't give a recognizable response to the "STOU" command.
If the server's response to "STOU" isn't recognized by Net::FTP but is reasonable, Graham Barr might be willing to change Net::FTP to
recognize it. If you like you can send the "--debug" output to me and I'll coordinate such requests.
--tmp-dir dir
Transfer files to dir on the remote host, then rename them when the transfer is complete. This is safer than --tmp-samedir because it
doesn't use "STOU" and so it works with more servers.
ftp-upload -h $host --tmp-dir incoming $file
--tmp-format fmt
Transfer files to "sprintf(fmt, file base name)", then rename them when the transfer is complete. Like --tmp-dir, this is safer than
--tmp-samedir because it doesn't use "STOU" and so it works with more servers.
ftp-upload -h $host --tmp-format tmp.%s $file
AUTHOR
Roderick Schertler <roderick@argon.org>
perl v5.8.7 2006-03-16 FTP-UPLOAD(1p)