{"id":322044,"date":"2021-04-25T15:00:21","date_gmt":"2021-04-25T15:00:21","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=322044"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=322044","title":{"rendered":"\u041f\u043e\u0447\u0435\u043c\u0443 \/usr\/bin\/test \u043d\u0430 4\u041a\u0431 \u043c\u0435\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \/usr\/bin\/[?"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\"><a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/553896\/\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/gc\/2n\/q-\/gc2nq-ria_lilrvjeo8wgfleno0.png\"><\/div>\n<p><\/a><\/p>\n<p>  \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441 Reddit \u043f\u043e\u0434 \u043d\u0438\u043a\u043e\u043c mathisweirdaf \u043f\u043e\u0434\u0435\u043b\u0438\u043b\u0441\u044f <a href=\"https:\/\/www.reddit.com\/r\/bash\/comments\/lbdfyi\/why_are_the_executables_and_test_a_4_kb_difference\/\">\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c\u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f\u043c\u0438<\/a>: <\/p>\n<pre><code class=\"bash\"> $ ls -lh \/usr\/bin\/{test,[} -rwxr-xr-x 1 root root 59K  Sep  5  2019 '\/usr\/bin\/[' -rwxr-xr-x 1 root root 55K  Sep  5  2019  \/usr\/bin\/test <\/code><\/pre>\n<p>  <code>[<\/code> \u0438 <code>test <\/code>\u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043f\u0441\u0435\u0432\u0434\u043e\u043d\u0438\u043c\u0430\u043c\u0438 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0430, \u0438 \u0432\u0441\u0435 \u0436\u0435 \u043c\u0435\u0436\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u043c\u0438 \u0438\u0445 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0438\u0437 GNU <i>coreutils <\/i>\u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0432 4\u041a\u0431. \u041f\u043e\u0447\u0435\u043c\u0443?<a name=\"habracut\"><\/a><\/p>\n<p>  \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0434\u043b\u044f \u0432\u0441\u0435\u0445, \u043a\u043e\u0433\u043e \u044d\u0442\u043e \u0443\u0434\u0438\u0432\u0438\u043b\u043e: \u0434\u0430, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 <code>\/usr\/bin\/[<\/code>. \u041f\u043e \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u0435 \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c <a href=\"https:\/\/www.vidarholen.net\/contents\/blog\/?p=25\">\u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f<\/a> (\u0430\u043d\u0433\u043b.), \u043d\u043e \u044f \u0432\u0441\u0435 \u0436\u0435 \u043a\u043e\u0440\u043e\u0442\u043a\u043e \u043f\u043e\u044f\u0441\u043d\u044e:<\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u043f\u0438\u0448\u0435\u0442\u0435 <code>if [ -e \/etc\/passwd ]; then ..<\/code> \u044d\u0442\u0430 \u0441\u043a\u043e\u0431\u043a\u0430 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u043d\u0435 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u043e\u043c \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438, \u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0441 \u0437\u0430\u0431\u0430\u0432\u043d\u044b\u043c \u0438\u043c\u0435\u043d\u0435\u043c. \u041e\u0431\u044b\u0447\u043d\u043e \u043e\u043d\u0430 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0432 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0443, \u043d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 <code>\/usr\/bin\/[<\/code>. \u042d\u0442\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442 \u043c\u043d\u043e\u0433\u043e\u0435 \u0438\u0437 \u0435\u0435 \u0437\u0430\u0433\u0430\u0434\u043e\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u0447\u0435\u043c\u0443 \u043e\u043d\u0430 \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u0430 \u043a \u043f\u0440\u043e\u0431\u0435\u043b\u0430\u043c: <code>[1=2]<\/code> \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0432\u0430\u043b\u0438\u0434\u043d\u043e, \u0447\u0435\u043c <code>ls-l\/tmp<\/code>.<\/p>\n<p>  \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u043e\u0442\u043a\u0443\u0434\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0432 \u0440\u0430\u0437\u043c\u0435\u0440\u0435? \u041c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0432\u044b\u0432\u043e\u0434 <i>objdump<\/i>, \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u043a\u0443\u0434\u0430 \u043f\u043e\u043c\u0435\u0449\u0430\u044e\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435. \u0412\u043e\u0442 \u0432\u044b\u0434\u0435\u0440\u0436\u043a\u0430 \u0438\u0437 <code>objdump -h \/usr\/bin\/[<\/code>:<\/p>\n<pre><code class=\"bash\">              size                                          offset 15 .text         00006e82  0000000000002640  0000000000002640  00002640  2**4 16 .fini         0000000d  00000000000094c4  00000000000094c4  000094c4  2**2 17 .rodata       00001e4c  000000000000a000  000000000000a000  0000a000  2**5<\/code><\/pre>\n<p>  \u0410 \u0432\u043e\u0442 objdump <code>-h \/usr\/bin\/test<\/code>:<\/p>\n<pre><code class=\"bash\">15 .text         000068a2  0000000000002640  0000000000002640  00002640  2**4 16 .fini         0000000d  0000000000008ee4  0000000000008ee4  00008ee4  2**2 17 .rodata       00001aec  0000000000009000  0000000000009000  00009000  2**5<\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0441\u0435\u0433\u043c\u0435\u043d\u0442 <code>.text<\/code> (\u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u043a\u043e\u0434) \u043d\u0430 1504 \u0431\u0430\u0439\u0442\u0430 \u0431\u043e\u043b\u044c\u0448\u0435, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a <code>.rodata<\/code> (\u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438 \u0441\u0442\u0440\u043e\u043a\u0438) \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0430 864 \u0431\u0430\u0439\u0442\u0430. <\/p>\n<p>  \u0421\u0443\u0442\u044c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430 <code>.text<\/code> \u0432\u044b\u043d\u0443\u0436\u0434\u0430\u0435\u0442 \u0435\u0433\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c\u0441\u044f \u0438\u0437 <code>8000 <\/code>\u0432 <code>9000<\/code>, \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u044f \u0433\u0440\u0430\u043d\u0438\u0446\u0443 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b <code>0\u04451000<\/code> (4096) \u0438, \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0441\u043c\u0435\u0449\u0430\u044f \u0432\u0441\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u044b \u043d\u0430 4096 \u0431\u0430\u0439\u0442\u043e\u0432. \u0418\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0443 \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u0432 \u0440\u0430\u0437\u043c\u0435\u0440\u0435 \u043c\u044b \u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c.<\/p>\n<p>  \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043d\u043e\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 <code>[<\/code> \u0438 <code>test <\/code>\u0432 \u0442\u043e\u043c, \u0447\u0442\u043e <code>[<\/code> \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u044f <code>]<\/code> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0430 \u0431\u044b \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u0434\u0430, \u0442\u0430\u043a \u0437\u0430\u0447\u0435\u043c \u0432\u0441\u0435 \u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0442\u0435 \u0441\u0430\u043c\u044b\u0435 ~1500 \u0431\u0430\u0439\u0442\u043e\u0432?<\/p>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0441\u043b\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u043a\u043e\u043f\u0438\u044e <i>coreutils <\/i>\u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u043b \u0441\u043f\u0438\u0441\u043e\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c:<\/p>\n<pre><code class=\"bash\">$ diff -u &lt;(nm -S --defined-only src\/[ | cut -d ' ' -f 2-) &lt;(nm -S --defined-only src\/test | cut -d ' ' -f 2-) --- \/dev\/fd\/63      2021-02-02 20:21:35.337942508 -0800 +++ \/dev\/fd\/62      2021-02-02 20:21:35.341942491 -0800 @@ -37,7 +37,6 @@  D __dso_handle  d _DYNAMIC  D _edata -0000000000000099 T emit_bug_reporting_address  B _end  0000000000000004 D exit_failure  0000000000000008 b file_name @@ -63,7 +62,7 @@  0000000000000022 T locale_charset  0000000000000014 T __lstat  0000000000000014 t lstat -0000000000000188 T main +00000000000000d1 T main  000000000000000b T make_timespec  0000000000000004 d nslots  0000000000000022 t one_argument @@ -142,16 +141,10 @@  0000000000000032 T umaxtostr  0000000000000013 t unary_advance  00000000000004e5 t unary_operator -00000000000003d2 T usage +0000000000000428 T usage  0000000000000d2d T vasnprintf  0000000000000013 T verror  00000000000000ae T verror_at_line -0000000000000008 D Version -00000000000000ab T version_etc -0000000000000018 T version_etc_ar -000000000000042b T version_etc_arn -000000000000002f R version_etc_copyright -000000000000007a T version_etc_va  000000000000001c r wide_null_string.2840  0000000000000078 T x2nrealloc  000000000000000e T x2realloc<\/code><\/pre>\n<p>  \u0413\u043b\u0430\u0432\u043d\u044b\u0435 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 \u2013 \u044d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>version_etc*<\/code>. \u0427\u0442\u043e \u043e\u043d\u0438 \u0434\u0435\u043b\u0430\u044e\u0442?<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 <a href=\"https:\/\/github.com\/coreutils\/gnulib\/blob\/8aea50f4dbe02dcb286d3e89fd3a66c0d1e307bf\/lib\/version-etc.c#L42-L262\">\u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c<\/a>:<\/p>\n<pre><code class=\"bash\">\/* The three functions below display the --version information the    standard way [...]<\/code><\/pre>\n<p>  \u042d\u0442\u043e 260 \u0441\u0442\u0440\u043e\u043a \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044b\u0445, \u0438\u043d\u0442\u0435\u0440\u043d\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445, \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0432\u044b\u0432\u043e\u0434 <code>--version<\/code>. \u0412\u0441\u0435 \u0432\u043c\u0435\u0441\u0442\u0435 \u043e\u043d\u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442 \u043e\u043a\u043e\u043b\u043e <code>bc &lt;&lt;&lt; &quot;ibase=16; 7A+2F+42B+18+AB+8+99&quot; = 1592 \u0431\u0430\u0439\u0442\u043e\u0432<\/code>.<\/p>\n<p>  \u0427\u0442\u043e \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442? \u0412\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 4\u041a\u0431 \u0443\u0445\u043e\u0434\u044f\u0442 \u0432\u043e\u0442 \u043d\u0430 \u0447\u0442\u043e:<\/p>\n<pre><code class=\"bash\">$ \/usr\/bin\/[ --version [ (GNU coreutils) 8.30 Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later &lt;https:\/\/gnu.org\/licenses\/gpl.html&gt;. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.  Written by Kevin Braunsdorf and Matthew Bradburn.<\/code><\/pre>\n<p>  <code>[ --version<\/code> \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0435\u0442 \u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 <code>]<\/code>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u0437\u043e\u0432 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c, \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439. GNU \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n<p>  \u0422\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c <code>\/usr\/bin\/test --version<\/code> \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u043c, \u0438 POSIX \u043f\u0440\u0435\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u043b\u0430 \u0443\u0441\u043f\u0435\u0445, \u043a\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 (<code>--version<\/code>) \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435 \u043f\u0443\u0441\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439.<\/p>\n<p>  \u042d\u0442\u0430 \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0434\u0430\u0436\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438:<\/p>\n<pre><code class=\"bash\">\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: [ \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043e\u043f\u0446\u0438\u0438 --help \u0438 --version, \u0430 test \u043d\u0435\u0442. test \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u0443\u044e \u0438\u0437 \u043d\u0438\u0445 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u0430\u043a \u043d\u0435\u043f\u0443\u0441\u0442\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443.<\/code><\/pre>\n<p>  \u0417\u0430\u0433\u0430\u0434\u043a\u0430 \u0440\u0430\u0437\u0433\u0430\u0434\u0430\u043d\u0430!<\/p>\n<p>  (\u0417\u0430\u0434\u0430\u0447\u043a\u0430: \u043a\u0430\u043a\u043e\u0432\u044b \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f, \u0435\u0441\u043b\u0438 \u0432\u043e\u043f\u0440\u0435\u043a\u0438 POSIX <code>test <\/code> \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c <code>--help<\/code> \u0438 <code>--version<\/code>?)<\/p>\n<p>  <a href=\"http:\/\/ruvds.com\/ru-rub?utm_source=habr&amp;utm_medium=Bright_Translate&amp;utm_campaign=pochemutest_na_4kb_menshe_chem_skobka\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ou\/g5\/kh\/oug5kh6sjydt9llengsiebnp40w.png\"><\/a><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/553896\/\"> https:\/\/habr.com\/ru\/company\/ruvds\/blog\/553896\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\"><a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/553896\/\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/gc\/2n\/q-\/gc2nq-ria_lilrvjeo8wgfleno0.png\"><\/div>\n<p><\/a><\/p>\n<p>  \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441 Reddit \u043f\u043e\u0434 \u043d\u0438\u043a\u043e\u043c mathisweirdaf \u043f\u043e\u0434\u0435\u043b\u0438\u043b\u0441\u044f <a href=\"https:\/\/www.reddit.com\/r\/bash\/comments\/lbdfyi\/why_are_the_executables_and_test_a_4_kb_difference\/\">\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c\u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f\u043c\u0438<\/a>: <\/p>\n<pre><code class=\"bash\"> $ ls -lh \/usr\/bin\/{test,[} -rwxr-xr-x 1 root root 59K  Sep  5  2019 '\/usr\/bin\/[' -rwxr-xr-x 1 root root 55K  Sep  5  2019  \/usr\/bin\/test <\/code><\/pre>\n<p>  <code>[<\/code> \u0438 <code>test <\/code>\u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043f\u0441\u0435\u0432\u0434\u043e\u043d\u0438\u043c\u0430\u043c\u0438 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0430, \u0438 \u0432\u0441\u0435 \u0436\u0435 \u043c\u0435\u0436\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u043c\u0438 \u0438\u0445 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0438\u0437 GNU <i>coreutils <\/i>\u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0432 4\u041a\u0431. \u041f\u043e\u0447\u0435\u043c\u0443?<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-322044","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/322044","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=322044"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/322044\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=322044"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=322044"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=322044"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}