harakit/docs/scrut.1

123 lines
2.2 KiB
Groff
Raw Normal View History

2024-02-16 08:40:38 +00:00
.\" Copyright (c) 2024 DTB <trinity@trinity.moe>
.\" Copyright (c) 2024 Emma Tebibyte <emma@tebibyte.media>
2024-02-16 08:40:38 +00:00
.\"
.\" This work is licensed under CC BY-SA 4.0. To see a copy of this license,
.\" visit <http://creativecommons.org/licenses/by-sa/4.0/>.
.TH scrut 1
.SH NAME
scrut \(en scrutinize file properties
2024-02-16 08:40:38 +00:00
.SH SYNOPSIS
scrut
.RB ( -bcdefgkprsuwxLS )
.RB [ file... ]
.SH DESCRIPTION
Scrut determines if given files comply with the opted requirements.
.SH OPTIONS
.B -L
.RS
Requires the given files to exist and be symbolic links.
.RE
.B -S
.RS
Requires the given files to exist and be sockets.
.RE
2024-02-16 08:40:38 +00:00
.B -b
.RS
Requires the given files to exist and be block special files.
.RE
2024-02-16 08:40:38 +00:00
.B -c
.RS
Requires the given files to exist and be character special files.
.RE
2024-02-16 08:40:38 +00:00
.B -d
.RS
Requires the given files to exist and be directories.
.RE
2024-02-16 08:40:38 +00:00
.B -e
.RS
Requires the given files to exist, and is redundant to any other option.
.RE
2024-02-16 08:40:38 +00:00
.B -e
.RS
Requires the given files to exist and be regular files.
.RE
2024-02-16 08:40:38 +00:00
.B -g
.RS
Requires the given files to exist and have their set group ID flags set.
.RE
2024-02-16 08:40:38 +00:00
.B -k
.RS
Requires the given files to exist and have their sticky bit set.
.RE
2024-02-16 08:40:38 +00:00
.B -p
.RS
Requires the given files to exist and be named pipes.
.RE
2024-02-16 08:40:38 +00:00
.B -r
.RS
Requires the given files to exist and be readable.
.RE
2024-02-16 08:40:38 +00:00
.B -u
.RS
Requires the given files to exist and have their set user ID flags set.
.RE
2024-02-16 08:40:38 +00:00
.B -w
.RS
Requires the given files to exist and be writable.
.RE
2024-02-16 08:40:38 +00:00
.B -x
.RS
Requires the given files to exist and be executable.
.RE
2024-02-16 08:40:38 +00:00
.SH EXIT STATUS
Scrut prints a debug message and exits unsuccessfully with the appropriate
sysexits.h(3) error code if invoked incorrectly. Scrut exits successfully if
the given files comply with their requirements and unsuccessfully otherwise.
2024-02-16 08:40:38 +00:00
.SH STANDARDS
Scrut is nearly compatible with POSIX's test utility though it is narrower in
scope. Notably, the
.B -h
option is now invalid and therefore shows usage information instead of being an
alias to the modern
2024-02-16 08:40:38 +00:00
.B -L
option.
.SH AUTHOR
Written by DTB <trinity@trinity.moe>.
.SH COPYRIGHT
Copyright © 2024 DTB. License AGPLv3+: GNU AGPL version 3 or later
<https://gnu.org/licenses/agpl.html>.
.SH SEE ALSO
access(3p), lstat(3p), test(1p)