Find the answer to your Linux question:
Results 1 to 3 of 3
Hi I want to know if somebody could assist me with the following: I need to push an ABC.txt file from a SUSE linux server to directory \TMS on a ...
  1. #1
    Just Joined!
    Join Date
    Oct 2006
    Posts
    3

    Question FTP and SFTP Automation for SUSE Linux

    Hi
    I want to know if somebody could assist me with the following:

    I need to push an ABC.txt file from a SUSE linux server to directory \TMS on a Windows server.
    This process needs to run automated & unattended each night at 1am. I am new to SUSE and have basic Redhat and Solaris experience.
    Could somebody please assist me with the script/process/cron commands?

    Your help would be appreciated!
    Giel

  2. #2
    Just Joined!
    Join Date
    Apr 2010
    Posts
    69
    I would think it would go something like this.

    You would want a persistent mount to the Windows server. So, you should make sure the Samba client package is installed, and you should either use fstab or autofs (preferred) to mount the Windows share.

    So, for the sake of simplicity:

    Code:
    # mkdir /mnt/windows
    # mount -t cifs //Windows/TMS /mnt/windows -ocredentials=/path/to/file/with/windows/creds,uid=crontabowner,gid=crontabowner
    Then it is just a matter of running an rsync job every night from cron using whatever user's crontab you set the UID/GID to above.

    Code:
    # crontab -e
    
    0 1 * * * rsync -av /path/to/ABC.txt /mnt/windows
    - Nathan

  3. #3
    Linux Newbie
    Join Date
    Jun 2006
    Posts
    139
    I have a script here you go, but aldo do not forget the cron entry:

    open xxx.xx.xxx.xx
    quote user give id
    quote pass give password
    binary
    lcd the file directory
    put the file
    quit

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...