AA-TEST(1)

NAME
aa-test - Test file types

SYNOPSIS
aa-test [-D] [-b | -d | -e | -f | -L | -p | -S | -r | -w | -x] [-R [TIMES]] FILE

OPTIONS

-b, --block
    Test whether FILE exists and is a block special

-D, --double-output
    Enable double-output mode. Instead of using stdout for regular output, and stderr for warnings and errors, everything is sent both to stdout and stderr. This is intended to redirect stderr to a log file, so full output can be both shown on console and logged.

-d, --directory
    Test whether FILE exists and is a directory

-e, --exists
    Test whether FILE exists

-f, --file
    Test whether FILE exists and is a regular file

-h, --help
    Show help screen and exit.

-L, --symlink
    Test whether FILE exists and is a symlink

-p, --pipe
    Test whether FILE exists and is a named pipe (FIFO)

-R, --repeat [TIMES]
    If FILE doesn't exist, wait 1 second and try again, repeating the test up to TIMES times. By default 0 is used, meaning repeat the test forever.

-r, --read
    Test whether FILE exists and read permission is granted

-S, --socket
    Test whether FILE exists and is a socket

-V, --version
    Show version information and exit.

-w, --write
    Test whether FILE exists and write permission is granted

-x, --execute
    Test whether FILE exists and execute (search) permission is granted

DESCRIPTION
aa-test(1) is a simple tool to check file types/permissions as specified, and return 0 when true, else:

1: Syntax error (e.g. invalid option)

2: System error (e.g. permission denied)

3: FILE doesn't exist

4: File exists, but the rest of the test failed (e.g. wrong type)

BUGS
They're probably crawling somewhere in there... if you happen to catch one, (or more) report it and I'll do my best to squash it.

REPOSITORY
You can find the latest source code of anopa as well as report bugs and/or suggest features on its GitHub repository, available at <https://github.com/jjk-jacky/anopa>; or visit its official website at <https://jjacky.com/anopa>

AUTHOR

Olivier Brunel <jjk@jjacky.com>