﻿{"id":92,"date":"2017-06-22T15:38:17","date_gmt":"2017-06-22T12:38:17","guid":{"rendered":"http:\/\/fewit.ru\/?p=92"},"modified":"2017-06-22T15:39:24","modified_gmt":"2017-06-22T12:39:24","slug":"%d0%ba%d0%b0%d0%ba-%d0%bd%d0%b0%d0%b9%d1%82%d0%b8-%d0%b2-linux-%d1%84%d0%b0%d0%b9%d0%bb%d1%8b-%d1%81%d0%be%d0%b4%d0%b5%d1%80%d0%b6%d0%b0%d1%89%d0%b8%d0%b5-%d0%bd%d1%83%d0%b6%d0%bd%d1%8b%d0%b9-%d1%82","status":"publish","type":"post","link":"https:\/\/fewit.ru\/?p=92","title":{"rendered":"\u041a\u0430\u043a \u043d\u0430\u0439\u0442\u0438 \u0432 Linux \u0444\u0430\u0439\u043b\u044b, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435 \u043d\u0443\u0436\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442"},"content":{"rendered":"<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0444\u0430\u0439\u043b\u044b, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442. \u0412 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0441\u0442\u0430\u043d\u0446\u0438\u0439 \u0432\u043e\u0432\u0441\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0438\u0437 \u0440\u0430\u0437\u0440\u044f\u0434\u0430 Desctop Search, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u0443\u044e\u0442 \u0432\u0441\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0439\u0442\u0438 \u0438\u0441\u043a\u043e\u043c\u044b\u0439 \u0444\u0430\u0439\u043b. \u0412 Linux \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 grep.<span id=\"more-584\"><\/span><\/p>\n<div id=\"toc_container\" class=\"toc_light_blue no_bullets\">\n<p class=\"toc_title\">\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/p>\n<ul class=\"toc_list\">\n<li><a href=\"#_grep\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c grep \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0442\u0435\u043a\u0441\u0442\u0430<\/a><\/li>\n<li><a href=\"#_grep-2\">\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f grep<\/a>\n<ul>\n<li><a href=\"#i\">\u041a\u0430\u043a \u043d\u0430\u0439\u0442\u0438 \u0442\u0435\u043a\u0441\u0442 \u0432\u043e \u0432\u0441\u0435\u0445 \u043f\u043e\u0434\u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430\u0445<\/a><\/li>\n<li><a href=\"#__grep\">\u0412\u044b\u0432\u0435\u0441\u0442\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u0435\u043d\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 grep \u0444\u0430\u0439\u043b\u043e\u0432<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n<h2><span id=\"_grep\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c grep \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0442\u0435\u043a\u0441\u0442\u0430<\/span><\/h2>\n<pre>grep \u201ctext string\u201d directory<\/pre>\n<p>\u041f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <strong>grep<\/strong> \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 text string \u0432\u043e \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043b\u0430\u0445 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 directory<\/p>\n<h2><span id=\"_grep-2\">\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f grep<\/span><\/h2>\n<pre>$ grep \"redeem reward\" \/home\/tom\/*.txt<\/pre>\n<h3><span id=\"i\">\u041a\u0430\u043a \u043d\u0430\u0439\u0442\u0438 \u0442\u0435\u043a\u0441\u0442 \u0432\u043e \u0432\u0441\u0435\u0445 \u043f\u043e\u0434\u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430\u0445<\/span><\/h3>\n<p><strong>grep <\/strong>\u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u0432 \u043f\u043e\u0434\u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043e\u043f\u0446\u0438\u044e <strong>-r<\/strong>:<\/p>\n<pre><code>$ grep -r \"redeem reward\" \/home\/tom<\/code><\/pre>\n<h3><span id=\"__grep\">\u0412\u044b\u0432\u0435\u0441\u0442\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u0435\u043d\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 grep \u0444\u0430\u0439\u043b\u043e\u0432<\/span><\/h3>\n<p>\u0427\u0442\u043e\u0431\u044b grep \u0432\u044b\u0432\u0435\u043b\u0430 \u0438\u043c\u0435\u043d\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u0441\u0442\u043e\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0446\u0438\u044e -H.<\/p>\n<pre>sudo grep -Hr pure-ftpd \/etc\/<\/pre>\n<p>\u0412\u044b\u0432\u043e\u0434:<\/p>\n<pre>...\r\n\/etc\/rc2.d\/S20pure-ftpd:# Provides: pure-ftpd\r\n\/etc\/rc2.d\/S20pure-ftpd:# pure-ftpd starts and stops the pure-ftpd ftp daemon\r\n\/etc\/rc2.d\/S20pure-ftpd:NAME=pure-ftpd\r\n\/etc\/rc2.d\/S20pure-ftpd:WRAPPER=\/usr\/sbin\/pure-ftpd-wrapper\r\n\/etc\/rc2.d\/S20pure-ftpd:PIDFILE=\/var\/run\/pure-ftpd\/pure-ftpd.pid\r\n\/etc\/rc2.d\/S20pure-ftpd:SUFFIX=`basename $ME | sed -ne 's\/^pure-ftpd-\\(.*\\)\/\\1\/p'`\r\n\/etc\/rc2.d\/S20pure-ftpd: DAEMON=\/usr\/sbin\/pure-ftpd-$SUFFIX\r\n...<\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0433\u043d\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434 \u0447\u0435\u0440\u0435\u0437 \u0444\u0438\u043b\u044c\u0442\u0440, \u0447\u0442\u043e\u0431\u044b \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u0435\u043d\u0430 \u0444\u0430\u0439\u043b\u043e\u0432, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0435\u0441\u0442\u044c \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u044b. \u041d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre>sudo grep -Hr pure-ftpd \/etc\/ | cut -d: -f1 | sort -u<\/pre>\n<p>\u0412\u044b\u0432\u043e\u0434:<\/p>\n<pre>grep: \/etc\/blkid.tab: No such file or directory\r\n\/etc\/default\/pure-ftpd-common\r\n\/etc\/ftpallow\r\n\/etc\/init.d\/pure-ftpd\r\n\/etc\/logrotate.d\/pure-ftpd-common\r\n\/etc\/pam.d\/pure-ftpd\r\n\/etc\/pure-ftpd\/conf\/AltLog\r\n\/etc\/pure-ftpd\/conf\/PureDB\r\n\/etc\/rc0.d\/K20pure-ftpd\r\n\/etc\/rc1.d\/K20pure-ftpd\r\n\/etc\/rc2.d\/S20pure-ftpd\r\n\/etc\/rc3.d\/S20pure-ftpd\r\n\/etc\/rc4.d\/S20pure-ftpd\r\n\/etc\/rc5.d\/S20pure-ftpd\r\n\/etc\/rc6.d\/K20pure-ftpd\r\n\r\n<\/pre>\n<p>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: http:\/\/itman.in\/linux-grep-find-text\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0444\u0430\u0439\u043b\u044b, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442. \u0412 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0441\u0442\u0430\u043d\u0446\u0438\u0439 \u0432\u043e\u0432\u0441\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0438\u0437 \u0440\u0430\u0437\u0440\u044f\u0434\u0430 Desctop Search,<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-92","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/fewit.ru\/index.php?rest_route=\/wp\/v2\/posts\/92","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fewit.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fewit.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fewit.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fewit.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=92"}],"version-history":[{"count":2,"href":"https:\/\/fewit.ru\/index.php?rest_route=\/wp\/v2\/posts\/92\/revisions"}],"predecessor-version":[{"id":94,"href":"https:\/\/fewit.ru\/index.php?rest_route=\/wp\/v2\/posts\/92\/revisions\/94"}],"wp:attachment":[{"href":"https:\/\/fewit.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=92"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fewit.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=92"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fewit.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=92"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}