Sponsored Content
Full Discussion: History of old FTP transfers
Top Forums UNIX for Dummies Questions & Answers History of old FTP transfers Post 302116163 by Nakul Mukerjee on Wednesday 2nd of May 2007 06:39:57 AM
Old 05-02-2007
Hi Jim,
Thanks for the reply. Need some clarifications regarding the code snippet you have given. I believe this is a shell script for storing details of new ftp transfers in a file.

echo "
open node
# Open connection to the remote server
USER pass pswd
# Connect using user-id and password
verbose
# Switch off verbose
cd /somewhere
put somefile
# Some instructions
bye
" > /usr/bin/ftp -n >> /path/to/myftp.log
# What does '> /usr/bin/ftp -n' do exactly. Should it be reading '<' from /usr/bin/ftp and then writing to a file.
# How can I go about implementing this script so that details of all new ftp transfers are logged in a file.

Thanks in Advance
Nakul
 

10 More Discussions You Might Find Interesting

1. Answers to Frequently Asked Questions

Automate FTP / Scripting FTP Transfers

One of our most frequent questions is how to automate ftp transfers. There are several approaches. Since I'm writing this post, we will start with my favorite technique. :) In Automated FTP task I present a simple example of my ksh co-process technique. And note that later in this thread I... (0 Replies)
Discussion started by: Perderabo
0 Replies

2. UNIX for Advanced & Expert Users

ssh - transfers with gateway hopping

Hi, I am having trouble transferring files from a source UNIX machine to a destination UNIX machine by hopping via 2 gateway machines. The user used for the transfer has been setup/authorized so no password is required to login. Summerized: source to gateway1 to gateway2 to destination ... (2 Replies)
Discussion started by: Solarius
2 Replies

3. UNIX for Advanced & Expert Users

How does netcat manage the data it transfers ?

Hi all, When using netcat to transfer the data over socket, if no connection is established, how long will netcat keep the data; will it discard the "oldest" data ? Say for example I use "Some Command | netcat -l -p port", the command I use will generate a lot of output constantly, while no... (2 Replies)
Discussion started by: qiulang
2 Replies

4. IP Networking

Slow LAN FTP Transfers with FreeBSD...

Hello, I've got a FreeBSD 6 server running on my network that I used as a file server for my main computer. However I've really become frustrated with the slow up/down speeds I'm getting, about 100KB/s, which is about as bad as if I was using a "real" server. My setup is as follows: ISP |... (4 Replies)
Discussion started by: CyberCat
4 Replies

5. Cybersecurity

automatic SCP transfers issues

Hi, I'm trying to set up scp but it isn't as nice as WinSCP. My requirement is to transfer a file from one machine to another with scp. This would run in a .ksh so it would need to avoid prompts (password/are you sure). First I tried this with v2: SSH with Keys HOWTO: SSH with Keys in a console... (1 Reply)
Discussion started by: Dird
1 Replies

6. UNIX for Advanced & Expert Users

History to Another file [local user history , but root access]

Hi all, My need is : 1. To know who , when , which command used. 2. Local user should not delete this information. I mean , with an example , i can say i have a user user1 i need to give all the following permissions to user1, : a. A specific directory other than his home... (3 Replies)
Discussion started by: linuxadmin
3 Replies

7. UNIX for Dummies Questions & Answers

History to Another file [local user history , but root access]

Hi all, My need is : 1. To know who , when , which command used. 2. Local user should not delete this information. I mean , with an example , i can say i have a user user1 i need to give all the following permissions to user1, : a. A specific directory other than his home... (1 Reply)
Discussion started by: sriky86
1 Replies

8. Shell Programming and Scripting

Scp/Rsync transfers stopped working?

Hi all, I have a backup script from my work computer to my home computer for my research for multiple reasons. It's a simple rsync script, with about 5 gigs of data. (Obviously with rsync it doesn't transfer 5 GB every time.). Recently, it has stopped working, scp also doesn't work, it simply... (1 Reply)
Discussion started by: corrado33
1 Replies

9. Shell Programming and Scripting

Identify failed file transfers during SFTP

Hi All, I have a pretty demanding requirement for an SFTP script I have been trying to put together. I have nearly 100 files (all with the names staring with T_PROD) generated in my local server daily. I need to transfer each of these files to a remote server via SFTP (that's a client... (6 Replies)
Discussion started by: Aviktheory11
6 Replies

10. UNIX for Beginners Questions & Answers

Sftp transfers file partially

Hi ALL, I have a shell script using except : #!/bin/bash HOST=abc.com USER=abc PASSWORD=123 SOURCE_FILE=file1.zip TARGET_DIR=/A/B/C /usr/bin/expect <<- EOF spawn /usr/bin/sftp $USER@$HOST expect "password:" send "$PASSWORD\r" expect "sftp>" send "cd patch1\n" ... (11 Replies)
Discussion started by: Asad
11 Replies
ct_ftp(3erl)						     Erlang Module Definition						      ct_ftp(3erl)

NAME
ct_ftp - FTP client module (based on the FTP support of the INETS application). DESCRIPTION
FTP client module (based on the FTP support of the INETS application). DATA TYPES
connection() = handle() | target_name() (see module ct) : handle() = handle() (see module ct_gen_conn) : Handle for a specific ftp connection. EXPORTS
cd(Connection, Dir) -> ok | {error, Reason} Types Connection = connection() Dir = string() Change directory on remote host. close(Connection) -> ok | {error, Reason} Types Connection = connection() Close the FTP connection. delete(Connection, File) -> ok | {error, Reason} Types Connection = connection() File = string() Delete a file on remote host get(KeyOrName, RemoteFile, LocalFile) -> ok | {error, Reason} Types KeyOrName = Key | Name Key = atom() Name = target_name() (see module ct) RemoteFile = string() LocalFile = string() Open a ftp connection and fetch a file from the remote host. RemoteFile and LocalFile must be absolute paths. The config file must be as for put/3. See also: put/3 . ls(Connection, Dir) -> {ok, Listing} | {error, Reason} Types Connection = connection() Dir = string() Listing = string() List the directory Dir. open(KeyOrName) -> {ok, Handle} | {error, Reason} Types KeyOrName = Key | Name Key = atom() Name = target_name() (see module ct) Handle = handle() Open an FTP connection to the specified node. You can open one connection for a particular Name and use the same name as reference for all subsequent operations. If you want the connection to be associated with Handle instead (in case you need to open multiple connections to a host for example), simply use Key , the configuration variable name, to specify the target. Note that a connection that has no associated target name can only be closed with the handle value. put(KeyOrName, LocalFile, RemoteFile) -> ok | {error, Reason} Types KeyOrName = Key | Name Key = atom() Name = target_name() (see module ct) LocalFile = string() RemoteFile = string() Open a ftp connection and send a file to the remote host. LocalFile and RemoteFile must be absolute paths. If the target host is a "special" node, the ftp address must be specified in the config file like this: {node,[{ftp,IpAddr}]}. If the target host is something else, e.g. a unix host, the config file must also include the username and password (both strings): {unix,[{ftp,IpAddr}, {username,Username}, {password,Password}]}. recv(Connection, RemoteFile) -> ok | {error, Reason} Fetch a file over FTP. The file will get the same name on the local host. See also: recv/3 . recv(Connection, RemoteFile, LocalFile) -> ok | {error, Reason} Types Connection = connection() RemoteFile = string() LocalFile = string() Fetch a file over FTP. The file will be named LocalFile on the local host. send(Connection, LocalFile) -> ok | {error, Reason} Send a file over FTP. The file will get the same name on the remote host. See also: send/3 . send(Connection, LocalFile, RemoteFile) -> ok | {error, Reason} Types Connection = connection() LocalFile = string() RemoteFile = string() Send a file over FTP. The file will be named RemoteFile on the remote host. type(Connection, Type) -> ok | {error, Reason} Types Connection = connection() Type = ascii | binary Change file transfer type AUTHORS
<> common_test 1.5.3 ct_ftp(3erl)
All times are GMT -4. The time now is 11:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy