Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Linux script command limit ?

  • 24-06-2004 8:33am
    #1
    Moderators, Education Moderators Posts: 1,828 Mod ✭✭✭✭


    Hi,

    I have written a java program that transfers files to an ftp based on selection criteria. Basically I'm ftp'ing mp3s onto a jukebox, to do this I generate a script file in java and then execute the script file. It seems to work fine for a thousand songs, however I tried putting a 4000 song selection on and it only reached 2900 and finished with no abnormal errors or anything.

    Is there a limit to the number of commands that can be issued in a script file ?
    /bin/sh
    
    ftp -v 10.0.0.10 <<__EOF
    username put "/public/mp3library/master selection/st1/All Saints - Bootie Call.mp3" /c/plexus/MUS00010.mpg
    put "/public/mp3library/master selection/ir13/Christy Moore - Voyage.mp3" /c/plexus/MUS01000.mpg
    put "/public/mp3library/master selection/ir16/George Thorogood - Bad To The Bone.mp3" /c/plexus/MUS10001.mpg
    

    Above is a snippet of the script file. Other errors occur such as certain characters like áéíóú and the likes not being outputted correctly. However, there is definitely not 1100 files like this.

    Any ideas ?


Comments

  • Registered Users, Registered Users 2 Posts: 2,771 ✭✭✭niallb


    You may find that the limit is in the ftp server.
    I had a similar problem with an old AIX ftp server several years ago.
    The command channel timed out and brought the link down.

    Try splitting your transfer into two groups of 2000 each.

    NiallB


  • Registered Users, Registered Users 2 Posts: 2,031 ✭✭✭lynchie


    Well if you are using java to generate the script for ya, then why dont ya go all the way and use one of the many java FTP client api's to actually do the FTP'ing for ya?


  • Moderators, Education Moderators Posts: 1,828 Mod ✭✭✭✭Slaanesh


    Why don't I indeed, because it seems handier this way ! I'll have a look into it though.

    Niall, splitting up the job doesn't seem to have made a dang difference. It's probably some stupid filename issue that prevents lot's of songs being transferred.

    Not to worry I'm working on it,

    thanks.


Advertisement