2024-02-16 08:40:38 +00:00
|
|
|
.\" Copyright (c) 2024 DTB <trinity@trinity.moe>
|
2024-03-27 00:26:51 +00:00
|
|
|
.\" 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
|
|
|
|
|
2024-02-18 06:12:39 +00:00
|
|
|
scrut \(en scrutinize file properties
|
2024-02-16 08:40:38 +00:00
|
|
|
|
|
|
|
.SH SYNOPSIS
|
|
|
|
|
|
|
|
scrut
|
|
|
|
.RB ( -bcdefgkprsuwxLS )
|
|
|
|
.RB [ file... ]
|
|
|
|
|
|
|
|
.SH DESCRIPTION
|
|
|
|
|
2024-03-27 01:22:30 +00:00
|
|
|
Determine if files comply with requirements.
|
2024-02-16 08:40:38 +00:00
|
|
|
|
|
|
|
.SH OPTIONS
|
|
|
|
|
2024-03-27 00:26:51 +00:00
|
|
|
.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
|
2024-03-27 00:26:51 +00:00
|
|
|
.RS
|
|
|
|
Requires the given files to exist and be block special files.
|
|
|
|
.RE
|
|
|
|
|
2024-02-16 08:40:38 +00:00
|
|
|
.B -c
|
2024-03-27 00:26:51 +00:00
|
|
|
.RS
|
|
|
|
Requires the given files to exist and be character special files.
|
|
|
|
.RE
|
|
|
|
|
2024-02-16 08:40:38 +00:00
|
|
|
.B -d
|
2024-03-27 00:26:51 +00:00
|
|
|
.RS
|
|
|
|
Requires the given files to exist and be directories.
|
|
|
|
.RE
|
|
|
|
|
2024-02-16 08:40:38 +00:00
|
|
|
.B -e
|
2024-03-27 00:26:51 +00:00
|
|
|
.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
|
2024-03-27 00:26:51 +00:00
|
|
|
.RS
|
|
|
|
Requires the given files to exist and be regular files.
|
|
|
|
.RE
|
|
|
|
|
2024-02-16 08:40:38 +00:00
|
|
|
.B -g
|
2024-03-27 00:26:51 +00:00
|
|
|
.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
|
2024-03-27 00:26:51 +00:00
|
|
|
.RS
|
|
|
|
Requires the given files to exist and have their sticky bit set.
|
|
|
|
.RE
|
|
|
|
|
2024-02-16 08:40:38 +00:00
|
|
|
.B -p
|
2024-03-27 00:26:51 +00:00
|
|
|
.RS
|
|
|
|
Requires the given files to exist and be named pipes.
|
|
|
|
.RE
|
|
|
|
|
2024-02-16 08:40:38 +00:00
|
|
|
.B -r
|
2024-03-27 00:26:51 +00:00
|
|
|
.RS
|
|
|
|
Requires the given files to exist and be readable.
|
|
|
|
.RE
|
|
|
|
|
2024-02-16 08:40:38 +00:00
|
|
|
.B -u
|
2024-03-27 00:26:51 +00:00
|
|
|
.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
|
2024-03-27 00:26:51 +00:00
|
|
|
.RS
|
|
|
|
Requires the given files to exist and be writable.
|
|
|
|
.RE
|
|
|
|
|
2024-02-16 08:40:38 +00:00
|
|
|
.B -x
|
2024-03-27 00:26:51 +00:00
|
|
|
.RS
|
|
|
|
Requires the given files to exist and be executable.
|
|
|
|
.RE
|
2024-02-16 08:40:38 +00:00
|
|
|
|
|
|
|
.SH EXIT STATUS
|
|
|
|
|
2024-03-27 01:22:30 +00:00
|
|
|
If the given files comply with the specified requirements, the program will exit
|
|
|
|
successfully. If not, it exits unsuccessfully.
|
|
|
|
|
|
|
|
When invoked incorrectly, a debug message will be printed and the program will
|
|
|
|
exit with the appropriate sysexits.h(3) error code.
|
2024-02-16 08:40:38 +00:00
|
|
|
|
|
|
|
.SH STANDARDS
|
|
|
|
|
2024-03-27 01:22:30 +00:00
|
|
|
The test(1p) utility contains functionality that was broken out into separate
|
|
|
|
programs. Thus, the scope of this program is narrower than it. Notably, the
|
2024-02-16 08:40:38 +00:00
|
|
|
.B -h
|
2024-02-18 06:12:39 +00:00
|
|
|
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)
|