/usr/bin/du + crontab weird bug

Victor Loureiro Lima victorloureirolima at gmail.com
Fri Feb 9 21:35:38 UTC 2007


Hello -hackers and -fs,

 Sorry for the cross-post but I didnt know where this particular post
belonged to...
 In a .br FreeBSD related mailing-list a user seems to have a found a
bug when using /usr/bin/du and crontab together, I am posting it here
to see what responses we get:

root at zion# du -s /etc
2544    /etc
root at zion# cat /etc/crontab | grep du
30      19      *       *       5       root    /usr/bin/du -s /etc >> /tmp/lele
root at zion# date
Fri Feb  9 19:29:30 BRST 2007
root at zion# cat /tmp/lele
5088    /etc
root at zion# du -s /etc
2544    /etc

What gives that when "/usr/bin/du -s" is running from crontab is gives
the exact double of entries in the directory but when it is running
from console itself, it doesnt display the same amount of
entries!?!?!?!

Weird bug...

/usr/bin/du version is:
$FreeBSD: src/usr.bin/du/du.c,v 1.38.2.1 2006/06/04 10:23:08 maxim Exp$
uname -a is:
FreeBSD zion 6.2-RELEASE FreeBSD 6.2-RELEASE #19: Thu Feb  8 11:00:59
BRST 2007     setuid at zion:/usr/obj/usr/src/sys/zion.kernel  amd64

ciao,
victor loureiro lima


More information about the freebsd-hackers mailing list