POSIX "강제 유틸리티"란 무엇입니까?

POSIX "강제 유틸리티"란 무엇입니까?

POSIX 문서여기그리고여기"Forcing Utilities"를 참조하십시오. 그러나 그러한 유틸리티 목록을 찾을 수 없습니다. POSIX 문서 어딘가에 있나요?

물론 위에 제공된 링크는 이전 버전의 문서를 가리킵니다. 어쩌면 그 이후로 용어가 변경되었을 수도 있습니다(예: "필수 유틸리티"라고 불렸던 것이 이제는 "필수 유틸리티", "필수 유틸리티" 또는 "핵심 유틸리티" 등으로 불림). 또는 필수/선택적 구별이 있습니다. 완전히 변경되어 버려졌나요? 설명을 환영합니다.

답변1

~에서당신이 인용한 부분 중 하나:

관련 옵션을 지원하는 시스템에만 존재하는 선택적 유틸리티입니다.암호이 IEEE Std 1003.1-2001 볼륨의 옵션에 대한 정보

필수 유틸리티는 선택 사항으로 표시되지 않은 유틸리티입니다.

예를 들어basename선택사항이라는 설명이 없으므로 필수입니다.alias다음과 같이 주석을 달았습니다.위로, 따라서 구현에서 "사용자 이식성 유틸리티" 옵션을 포함한다고 주장하는 경우에만 필수입니다.command필수이지만 구현에서 "사용자 이식성 유틸리티" 옵션을 포함한다고 주장하지 않는 한 -v및 옵션은 필수가 아닙니다.-V

답변2

이는 항상 시스템이 얼마나 "규정을 준수"하는지에 따라 다르지만POSIX 유틸리티, 아래 목록을 확인할 수 있습니다. "DEVELOPMENT"로 표시된 경우 선택 사항으로 간주됩니다.

"강제" 유틸리티:

alias - define or display aliases
ar - create and maintain library archives
asa - interpret carriage-control characters
at - execute commands at a later time
awk - pattern scanning and processing language
basename - return non-directory portion of a pathname
batch - schedule commands to be executed in a batch queue
bc - arbitrary-precision arithmetic language
bg - run jobs in the background
c99 - compile standard C programs
cal - print a calendar
cat - concatenate and print files
cd - change the working directory
chgrp - change the file group ownership
chmod - change the file modes
chown - change the file ownership
cksum - write file checksums and sizes
cmp - compare two files
comm - select or reject lines common to two files
command - execute a simple command
compress - compress data
cp - copy files
crontab - schedule periodic background work
csplit - split files based on context
cut - cut out selected fields of each line of a file
date - write the date and time
dd - convert and copy a file
df - report free disk space
diff - compare two files
dirname - return the directory portion of a pathname
du - estimate file space usage
echo - write arguments to standard output
ed - edit text
env - set the environment for command invocation
ex - text editor
expand - convert tabs to spaces
expr - evaluate arguments as an expression
false - return false value
fc - process the command history list
fg - run jobs in the foreground
file - determine file type
find - find files
fold - filter for folding lines
fort77 - FORTRAN compiler (FORTRAN)
fuser - list process IDs of all processes that have one or more files open
gencat - generate a formatted message catalog
getconf - get configuration values
getopts - parse utility options
grep - search a file for a pattern
hash - remember or report utility locations
head - copy the first part of files
iconv - codeset conversion
id - return user identity
ipcrm - remove an XSI message queue, semaphore set, or shared memory segment identifier
ipcs - report XSI interprocess communication facilities status
jobs - display status of jobs in the current session
join - relational database operator
kill - terminate or signal processes
link - call link function
ln - link files
locale - get locale-specific information
localedef - define locale environment
logger - log messages
logname - return the user's login name
lp - send files to a printer
ls - list directory contents
m4 - macro processor
mailx - process messages
man - display system documentation
mesg - permit or deny messages
mkdir - make directories
mkfifo - make FIFO special files
more - display files on a page-by-page basis
mv - move files
newgrp - change to a new group
nice - invoke a utility with an altered nice value
nl - line numbering filter
nohup - invoke a utility immune to hangups
od - dump files in various formats
paste - merge corresponding or subsequent lines of files
patch - apply changes to files
pathchk - check pathnames
pax - portable archive interchange
pr - print files
printf - write formatted output
ps - report process status
pwd - return working directory name
qalter - alter batch job
qdel - delete batch jobs
qhold - hold batch jobs
qmove - move batch jobs
qmsg - send message to batch jobs
qrerun - rerun batch jobs
qrls - release batch jobs
qselect - select batch jobs
qsig - signal batch jobs
qstat - show status of batch jobs
qsub - submit a script
read - read from standard input into shell variables
renice - set nice values of running processes
rm - remove directory entries
rmdir - remove directories
sed - stream editor
sh - shell, the standard command language interpreter
sleep - suspend execution for an interval
sort - sort, merge, or sequence check text files
split - split a file into pieces
strings - find printable strings in files
stty - set the options for a terminal
tabs - set terminal tabs
tail - copy the last part of a file
talk - talk to another user
tee - duplicate standard input
test - evaluate expression
time - time a simple command
touch - change file access and modification times
tput - change terminal characteristics
tr - translate characters
true - return true value
tsort - topological sort
tty - return user's terminal name
type - write a description of command type
ulimit - set or report file size limit
umask - get or set the file mode creation mask
unalias - remove alias definitions
uname - return system name
uncompress - expand compressed data
unexpand - convert spaces to tabs
uniq - report or filter out repeated lines in a file
unlink - call the unlink function
uucp - system-to-system copy
uudecode - decode a binary file
uuencode - encode a binary file
uustat - uucp status enquiry and job control
uux - remote command execution
vi - screen-oriented (visual) display editor
wait - await process completion
wc - word, line, and byte or character count
who - display who is on the system
write - write to another user
xargs - construct argument lists and invoke utility
zcat - expand and concatenate data

개발("선택 사항") 유틸리티:

admin - create and administer SCCS files (DEVELOPMENT)
cflow - generate a C-language flowgraph (DEVELOPMENT)
ctags - create a tags file (DEVELOPMENT, FORTRAN)
cxref - generate a C-language program cross-reference table (DEVELOPMENT)
delta - make a delta (change) to an SCCS file (DEVELOPMENT)
get - get a version of an SCCS file (DEVELOPMENT)
lex - generate programs for lexical tasks (DEVELOPMENT)
make - maintain, update, and regenerate groups of programs (DEVELOPMENT)
nm - write the name list of an object file (DEVELOPMENT)
prs - print an SCCS file (DEVELOPMENT)
rmdel - remove a delta from an SCCS file (DEVELOPMENT)
sact - print current SCCS file-editing activity (DEVELOPMENT)
sccs - front end for the SCCS subsystem (DEVELOPMENT)
strip - remove unnecessary information from strippable files (DEVELOPMENT)
unget - undo a previous get of an SCCS file (DEVELOPMENT)
val - validate SCCS files (DEVELOPMENT)
what - identify SCCS files (DEVELOPMENT)
yacc - yet another compiler compiler (DEVELOPMENT)

방법

# ksh93: Version AJM 93u+ 2012-08-01
## lots of ugly, lazy hacks but 
## it should be readable enough to give you the idea

cd /tmp

[ ! -s /tmp/posix.list ] && curl --location --silent http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ | sed -e 's/<[^>]*>//g' | awk '/^[a-z].*.html/ { print $1 }' | tee /tmp/posix.list

rm -f /tmp/posix.txt /tmp/all_tools.txt

echo '#!/bin/sh' > /tmp/clean_all.sh

cat /tmp/posix.list | while read P
do
    echo
    p=$(basename "${P}" .html)
    echo "Getting ${p} details"
    [ ! -s "${p}.txt" ] && curl --location --silent "http://pubs.opengroup.org/onlinepubs/9699919799/utilities/${P}" | sed -e 's/<[^>]*>//g' > "${p}.txt"
    grep -A3 ^NAME "${p}.txt" | grep ^${p} | tee -a /tmp/posix.txt
    echo "${p}.txt" >> /tmp/all_tools.txt
done

sed 's|^|rm -f /tmp/|' < /tmp/all_tools.txt >> /tmp/clean_all.sh
chmod +x /tmp/clean_all.sh
echo 'rm -f /tmp/posix.list' >> /tmp/clean_all.sh
echo 'rm -f /tmp/posix.txt /tmp/all_tools.txt' >> /tmp/clean_all.sh

grep -v DEVELOPMENT /tmp/posix.txt
grep DEVELOPMENT /tmp/posix.txt

답변3

Kajukenbo와 schily의 답변이 올바르지 않습니다.

나는 답변에 대해 "코멘트"를 달기에 충분한 "평판"을 가지고 있지 않습니다.잘못된아니면 공평하게 말하면,오해의 소지가 있는브라우저가 아닌 프린터용으로 설계된 POSIX 사양의 레이아웃입니다.

프리젠테이션 부족/불량한 사양 레이아웃으로 인한 오해

OP는 POSIX "쉘 및 유틸리티"(="XCU"POSIX의 일부), "필수" 유틸리티와 "선택" 유틸리티 간의 차이를 제공합니다. Gilles의 설명을 참조하세요(평소와 마찬가지로 훌륭하지만 alias예제는 오래되었습니다. 아래 참조). 불행히도POSIX 2004 사양특히 에디션에는 해당 장의 나머지 부분에 대한 링크가 없습니다. 유틸리티 자체의 일부가 아닙니다. 예를 들면. Kajukenbo는 다른 곳에서 검색해서 찾은 것 같습니다.POSIX 2017 사양의 "유틸리티" 색인- 색인만 있고(url의 "idx" 참조) XCU 4장에서는 이 목록을 읽는 방법을 설명하는 내용이 없습니다.

순수 유틸리티 목록을 해석하려고 하면 필수 유틸리티와 선택 유틸리티를 혼합하고 "선택"에 대한 자체(POSIX 규격이 아닌) 범주를 생성하는 "필수" 목록이 생성됩니다.

올바른 사양 탐색

이제 브라우징이 일부 개선된 POSIX 2017의 2018 버전이 있습니다.XCU 2018 버전, 머리글과 바닥글에 탐색을 위한 "이전"과 "다음"이 있고 해당 장의 목차로 연결되는 (잘못된 이름) "홈"이 있습니다. 불행하게도 4장은 모든 유틸리티의 간단한 목록을 제공하지 않습니다. Kajukenbo에서 찾은 색인 링크를 참조해야 합니다. 여기 또는 4장 이후에는 POSIX에서 고려하는 각 유틸리티에 대한 설명을 볼 수 있습니다. 이 설명에서 결정적인 요소는개발이라는 단어의 유무가 아니라이는 admin비필수(선택)와 alias필수를 모두 만듭니다.그런데 '마진코드'가 있나요?, 요약 단락의 왼쪽 상단 모서리에 대괄호 안에 위 첨자 링크로 표시됩니다(예: "[XSI]" ) admin. 특히 참고하세요. POSIX 사양에는 "XSI"가 언급되어 있습니다.일관성처럼"가능한"필수"가 아닌 "XSI"를 지원하십시오.

왼쪽 상단암호다음 링크와 함께 XCU 4장 소개(위 참조)에서 다룹니다.코드 테이블하나도 있습니다이 "마진 코드 표기"를 설명하는 섹션. 거기에 언급된 개요 단락의 "음영"은 일반적으로 약간의 강철 파란색 배경으로 렌더링되지만 이는 본질적으로 식별 기능이라기보다는 구별 기능일 뿐입니다. 즉, 필수 유틸리티와 선택적 유틸리티에 대한 설명만 전환할 수 있다는 것을 알게 될 것입니다. 선택적 링크에 직접 액세스할 때는 그렇지 않습니다. 그러나 선택적 링크에 직접 액세스할 때는 그렇지 않습니다. 강철 파란색 배경에 파란색 링크 레이블이 있는 것은 최선의 디자인 아이디어가 아닙니다.

POSIX 버전

Gilles의 답변은 aliasPOSIX 2004의 선택적 답변에서 POSIX 2008의 필수 답변으로 변경되었습니다. 그러므로 당신은 반드시POSIX 버전도 고려해보세요규정 준수를 주장하거나 검색합니다. "표준", "개정", "버전", "버전" 때문에 혼란스러울 수 있습니다. 예를 들어 opengroup.com의 사양 제목에 제공된 IEEE 표준 번호를 사용하는 것이 더 나을 것입니다. 현재 "IEEE 표준 1003.1-2017". IEEE 버전 관리는 잘 문서화되어 있습니다.위키피디아 POSIX항목은 XCU와 같은 섹션으로 나누어져 있습니다.위키피디아의 SUS반면에 이 항목은 IEEE 번호가 아닌 POSIX "버전"을 요구합니다.

고통스럽기는 하지만 일부 UNIX 및/또는 엔지니어의 사고방식을 탐구하면 큰 이점을 얻을 수 있습니다.

답변4

그러한 유틸리티 목록을 찾을 수 없습니다. POSIX 문서 어딘가에 있나요?

캔트. 각 유틸리티를 개별적으로 확인하고 이를 기반으로 목록을 직접 작성해야 합니다. 그러나 실제로는 여러 유틸리티에 대한 피상적인 정보보다는 하나의 유틸리티에 대한 자세한 정보가 필요한 것을 항상 선호합니다.

물론 위에 제공된 링크는 이전 버전의 문서를 가리킵니다.

그들은. 그러나 새로운 시스템을 이해하지 못하는 "이전" 시스템을 사용해야 할 수도 있습니다.

아마도 그 이후로 명칭이 변경되었을 수도 있습니다.

아니요, 이는 업계 표준입니다. 업계 표준이 너무 많이 또는 너무 자주 변경되면 살아남을 수 없습니다. 이는 단일 제조업체의 최종 사용자 제품과 혼동되어서는 안 됩니다. 이 제품은 변경 사항이 너무 많고 자주 발생하여 고객이 재구매할 수밖에 없는 경우가 있습니다.

관련 정보