According to the documentation for test(): -s file : The file is empty But the behaviour is exactly the opposite: -s returns false for empty files, and true for non-empty files. This is consistent with the source, which uses is_nonempty_file to implement -s. This seems like a documentation error. Cheers, --prashanth