how do I create an ftp script


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers how do I create an ftp script
# 1  
Old 01-13-2005
how do I create an ftp script

Hi ,

How can I create an ftp script to:

-- connect to a remote site (nt server)
-- check for a directory and subdirectories
-- tar the parent directory (along with the subdirectories)
-- tranfer the tar file to the target directory
-- unzip the tar files.
-- log out.

Thanks for the help.

Leo
# 2  
Old 01-13-2005
Please read the FAQ article for a start...

THE UNIX FORUMS > General Topics > Answers to Frequently Asked Questions > "Automate FTP / Scripting FTP Transfers"

But you are not going to able to use tar via ftp.
# 3  
Old 01-14-2005
Java undocument feature of ftp

;-)
could be usefull for this task:

This undocumented feature of the "put" and "get" command from the FTP-System extracts a tarfile to . on the fly while transferring.

get filename.suffix |"tar xf -"
put "| tar cf - ." filename.tar

don't know if it is able to transfer directories.... i've tried the syntax on solaris2solaris and it works great.

greetings pressy
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Unable to create a ftp user only

Hi all I am facing difficulties when using the useraddcommand. when running useradd -u 60006 -g 100 -d /opt/xxx/yyy/z -m -s /bin/false ftpuser It does create the user, but with a wrong home directory. It creates its home directory at /home/ftpuser Please can you help? (2 Replies)
Discussion started by: fretagi
2 Replies

2. Solaris

Disable create subdirectory Solaris 8 ftp

Running Solaris 10. For FTP users or groups, I want to prevent them from creating new subdirectories, but I still want to allow them to create, upload, download files from the subdirs. I understand how to set the general file/directory permissions -- read, write, execute. So for a directory,... (0 Replies)
Discussion started by: themonman
0 Replies

3. Red Hat

[Solved] FTP 553 Could not create file.

Hi, We have one server - "ftpserver", just setup with RedHat 5.7. ftpserver is able to get & put from another server, however, other server are unable to get or put in the ftpserver. # su - ftpuser $ pwd /home/ftpuser $ cd .. $ ls -ltr drwxrwxrwx 3 ftpuser ftpuser 4096 Sep 10 09:19... (0 Replies)
Discussion started by: beginningDBA
0 Replies

4. Homework & Coursework Questions

Create script to add user and create directory

first off let me introduce myself. My name is Eric and I am new to linux, I am taking an advanced linux administration class and we are tasked with creating a script to add new users that anyone can run, has to check for the existence of a directory. if the directory does not exist then it has... (12 Replies)
Discussion started by: pbhound
12 Replies

5. UNIX for Advanced & Expert Users

How to create user with access only to one folder through ftp?

Hi all, Can someone help me with creating user with special privilegies? I need to create user who will have access ONLY to one folder (like /etc/log/) through ftp (read only access) and which will not have any other ways to log in like telnet, ssh etc.? (5 Replies)
Discussion started by: nypreH
5 Replies

6. Shell Programming and Scripting

Im trying to create a FTP Cron Job

Hello, Im fairly new to this and am hoping for your help in moving forward. 1. I need to carry out a FTP transfer from SERVER1 to SERVER2 at 3am every morning. 2. The FTP is to work on SERVER1 3. There will be many files to transfer (96 files per day) 4. I want to delete the files... (3 Replies)
Discussion started by: nozerf
3 Replies

7. UNIX for Dummies Questions & Answers

create folder in windows from unix while FTP

Hi, I would like to know if it's possible to create a folder in a Windows Server while running a ftp script in Unix. The idea is to create a script that searches for different files in folders, and when the file is found, take the path of that file and create it to Windows and ftp the file to... (0 Replies)
Discussion started by: Metalero de Oz
0 Replies

8. Shell Programming and Scripting

FTP is using shell scripts create ? for file

ftp -n -v <<EOF verbose open 3.57.40.79 user infodvlp pr0gram ascii lcd /home/a501420038/GLA/Success_Load/ cd /ftp/SrcFiles/csg/InstruAsia/ get AU_Success_Log.txt close quit EOF Please help on this, this gives the out put "AU_Success_Log.txt?" As question mark in the last what will... (1 Reply)
Discussion started by: a501420038
1 Replies

9. Shell Programming and Scripting

Is it possible to create audit trail on remote server using FTP

Hi, I'm automatically FTPing few files daily as a cron job to a remote server. I wanted to know if there is a way to log the successful transfer in a log on the remote server? The log on the remote server should look something like this. 10/30/2006 00:00:02 - File 1 transferred... (0 Replies)
Discussion started by: dayanand
0 Replies

10. Solaris

How to create a new ftp user account with limited access..?

Hi All, I'm using solaris 2.8, and I want create a new ftp user account with the following restrictions: - Have only ftp access, no telnet or rlogin - Have restricted access to its home directory example /export/home/newuser - Deny access to any other directory. Thanks for your help, ... (6 Replies)
Discussion started by: Jeremy3
6 Replies
Login or Register to Ask a Question