GNUs coreutils) by something more sophisticated which is compatible with both, Linux and the BSDs (fixes issue 526)