Move files from WamNet to server using ftp

Posted on 2007-10-08
Last Modified: 2013-12-27
Hello all,

I am a complete beginner at writing scripts and have been given a project to get me started.

I have been asked to write a script that will move .zip files from our WamNet! server (linux) to our server (Solaris 9) to keep as and when needed.

The files should be moved automatically as they finish uploading to the WamNet! server.

Once moved, the files are to be unzipped using the code the client has supplied:

echo `date` >> ~/Desktop/Economist_unzipped_log
for i in `ls *.zip`;
echo $i >> ~/Desktop/Economist_unzipped_log
unzip -uo $i
echo `date` >> ~/Desktop/Economist_unzipped_log

I'm sure I've left out some vital information. Please let me know whatever you need to know in order to make this work.

Thank you in advance,

Question by:stuffedparrot
    1 Comment
    LVL 38

    Accepted Solution

    A few  things you can do:

        You can setup NFS mount to make the Solaris box as a NFS server and the linux box as the client, to mount the Solaris filesystem to your
    Linux box, you can then use  tools like tar, cpio, rsync, cp etc to copy
    the data across the Solaris box.
        Please have a look at the NFS FAQ:
        if you don't want to setup NFS, you still can use rsync to sync the files/dirs accross the Solaris box.
        more details about rsync:
        Please have a look at the FAQ and examples to learn the usage of rsync.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (…
    Over the past decade, as Internet security has become a chief concern of IT professionals, one of the most common questions administrators and users ask is, “Which is more secure, SFTP or FTPS?” In short, both file transfer protocols offer a high…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now