Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, i have the following shell : export PATH=/u01/app/oracle/product/10.2.0/db_2/bin:/usr/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin ftp -u -v -n -i > /bk01/exports/FTP_OUTPUT.LOG <<EOF open 197.0.0.78 user orabackup orabackup cd /media/disco/BK_Oracle bin put FILE00001.LOG put FILE00001.DMP quit ...
  1. #1
    Just Joined!
    Join Date
    May 2010
    Posts
    2

    different output of ftp between cron and command line

    Hi,

    i have the following shell :

    export PATH=/u01/app/oracle/product/10.2.0/db_2/bin:/usr/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin

    ftp -u -v -n -i > /bk01/exports/FTP_OUTPUT.LOG <<EOF
    open 197.0.0.78
    user orabackup orabackup
    cd /media/disco/BK_Oracle
    bin
    put FILE00001.LOG
    put FILE00001.DMP
    quit
    EOF


    executing the shell from command line, the output is :

    Connected to 197.0.0.78.
    220 Bienvenido al servicio FTP del servidor backup.
    530 Please login with USER and PASS.
    530 Please login with USER and PASS.
    331 Please specify the password.
    230 Login successful.
    250 Directory successfully changed.
    200 Switching to Binary mode.
    local: EXPO_APOT10G_20100531.LOG remote: EXPO_APOT10G_20100531.LOG
    227 Entering Passive Mode (197,0,0,78,200,162)
    150 Ok to send data.
    226 File receive OK.
    127498 bytes sent in 0.0022 seconds (5.7e+04 Kbytes/s)
    local: EXPO_APOT10G_20100531.DMP remote: EXPO_APOT10G_20100531.DMP
    227 Entering Passive Mode (197,0,0,78,175,141)
    150 Ok to send data.
    226 File receive OK.
    458190848 bytes sent in 6.1 seconds (7.3e+04 Kbytes/s)
    221 Goodbye.



    executing the shell from cron, the output is :

    Connected to 197.0.0.78 (197.0.0.7.
    220 Bienvenido al servicio FTP del servidor backup.
    331 Please specify the password.
    230 Login successful.
    250 Directory successfully changed.
    200 Switching to Binary mode.
    local: EXPO_APOT10G_20100531.LOG remote: EXPO_APOT10G_20100531.LOG
    local: EXPO_APOT10G_20100531.DMP remote: EXPO_APOT10G_20100531.DMP
    221 Goodbye.


    why from cron the output no show the statistics in red ...?

    thanks

    vimalaga

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Just a guess, but if stdout is redirected, some messages such as the ones you highlight may be suppressed by FTP. Alternatively, if they are sent to stderr, then they won't be put in the output file unless you also redirect stderr output as well.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    May 2010
    Posts
    2
    Thanks for response,

    ok, but i need to search "226 File receive OK" in the output file for i know if the file was transmitted ok.
    this search is carried out by other shell.

    what i must change in my shell so that from cron show lines highlight ..?

    thanks

Posting Permissions

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