ftp shell script

Discussion in 'Programming/Scripts' started by mcrosby, May 30, 2006.

  1. mcrosby

    mcrosby New Member

    hello everyone,
    i have developed a shell script to connect through ftp to a remote server. I was able to get the ftp working and automatically transfer files. Now what i am trying to do is download files from the remote server and then compare those files to the files located in a folder on my local drive. If the files are not equal i want it to output an error to a file or if they are equal show that the operation completed successfully. Anyone have any ideas or can point me in the right direction?
     
  2. falko

    falko Super Moderator ISPConfig Developer

    You can use the md5sum command and compare the MD5 hashes of the files. If they are not identical, then the files differ.
     
  3. mcrosby

    mcrosby New Member

    I am not sure how to use the md5 hashes as I am fairly new to shell scripting do you have any references websites or could you get me started?
     
  4. mcrosby

    mcrosby New Member

    Ok i seem to have the diff script working on its own and it records the differences to a file. How would i go about combining my ftp script and my diff script because if i end the ftp script it closes out the script entirely.
     
  5. falko

    falko Super Moderator ISPConfig Developer

  6. EvanCarroll

    EvanCarroll New Member HowtoForge Supporter

    This shoulden't require a script at all, you are reinventing the wheel.

    Please see `man wget` and -m
     
  7. urnetmate

    urnetmate New Member

    code to connect ftp shell script


    Please telll me code for shell script to connect ftp.
    Waiting for replay..
    Thanks in advance
     
  8. urnetmate

    urnetmate New Member

  9. falko

    falko Super Moderator ISPConfig Developer

    Do you mean wget?
     

Share This Page