On Wed, Oct 26, 2005 at 08:23:41PM -0400, Michael Stone wrote: > serverity 335961 normal > thanks > > On Thu, Oct 27, 2005 at 12:45:05AM +0200, Eric Van Buggenhaut wrote: > >Severity: important > > No, it's not. Please don't abuse the BTS severities. > > >I have a crontab installed on a server that does that: > >find $ORIGDIR -type f -exec stat -c "%n" {} \; |sort > $CURRENT_FILE
Using find -type f doesn't solve the problem. I can even reproduce it on my laptop (not the server) with other directories, see for example: [EMAIL PROTECTED]:~]$ find /usr/local/RealPlayer/share/r* -type f|sort /usr/local/RealPlayer/share/realplay.applications /usr/local/RealPlayer/share/realplay.desktop /usr/local/RealPlayer/share/realplay/embedded_logo.png /usr/local/RealPlayer/share/realplay/icon.png /usr/local/RealPlayer/share/realplay.keys /usr/local/RealPlayer/share/realplay/logo.png /usr/local/RealPlayer/share/realplay.mime /usr/local/RealPlayer/share/realplay.png /usr/local/RealPlayer/share/realplay/prefs_general.png /usr/local/RealPlayer/share/realplay/setup_title.png /usr/local/RealPlayer/share/realplay/setup_welcome.png /usr/local/RealPlayer/share/realplay.xml How is it that I get that sequence: . . / / . / . . / / / . ?? > > Why? That'll give the same output as find $ORIGDIR -type f |sort > > $CURRENT_FILE > but with an extra process spawned for each filesystem entry. > > >Focusing on the filename (basename is the same), one day I get this sort: > > > >anexo sobre el programa de trabjo infantil.doc > >HISTORICO PROGRAMAS.doc > >PROGRAMAS MEMORIA 2004.doc > > > > > >And the next day I get that one: > > > >HISTORICO PROGRAMAS.doc > >PROGRAMAS MEMORIA 2004.doc > >Proyectos A POR PROGRAMAS.xls > >anexo sobre el programa de trabjo infantil.doc > > > >How can it be that from one day to the other the file is sorted > >differently ?? > > If I had to guess I'd say that someone restarted cron and their > environment is different than the system default one. (I.e., either > their LANG is unset or set to C, or their LC_COLLATE is set to C.) No, the crontab is launched by /etc/crontab and always under the same id, ie root: [EMAIL PROTECTED]:~$ tail -n2 /etc/crontab 0 4 * * * root /usr/bin/flexbackup -set all 0 5 * * * root /usr/local/bin/lista_borrados Given this and the example above, I'd say that the problem has nothing to do with locale -- Eric VAN BUGGENHAUT [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]