• # man bash ....

    Posté par . En réponse au message [Bash] Detecter des fichiers de taille nulle. Évalué à 6.

    CONDITIONAL EXPRESSIONS
    Conditional expressions are used by the [[ compound command and the
    test and [ builtin commands to test file attributes and perform string
    and arithmetic comparisons. Expressions are formed from the following
    unary or binary primaries. If any file argument to one of the pri-
    maries is of the form /dev/fd/n, then file descriptor n is checked. If
    the file argument to one of the primaries is one of /dev/stdin,
    /dev/stdout, or /dev/stderr, file descriptor 0, 1, or 2, respectively,
    is checked.

    [....]

    -s file
    True if file exists and has a size greater than zero.