* [Comm] Bash search
@ 2006-07-25 16:59 Maxim Ivanov
2006-07-25 17:36 ` Olaf Portvineson
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Maxim Ivanov @ 2006-07-25 16:59 UTC (permalink / raw)
To: ALT Linux Community
Подскажите пожалуйста, как в каталоге со множеством подкаталогов
найти все каталоги, в котором лежит файл lastauth, содержащий строку
0.0.0.0 ?
Find grep cat - все подойдет, только с синтаксисом проблема...
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Comm] Bash search
2006-07-25 16:59 [Comm] Bash search Maxim Ivanov
@ 2006-07-25 17:36 ` Olaf Portvineson
2006-07-25 17:39 ` Damir Shayhutdinov
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Olaf Portvineson @ 2006-07-25 17:36 UTC (permalink / raw)
To: ALT Linux Community
On 7/25/06, Maxim Ivanov <ivanov_m@pvg.ru> wrote:
> Подскажите пожалуйста, как в каталоге со множеством подкаталогов
> найти все каталоги, в котором лежит файл lastauth, содержащий строку
> 0.0.0.0 ?
>
> Find grep cat - все подойдет, только с синтаксисом проблема...
> _______________________________________________
> Community mailing list
> Community@lists.altlinux.org
> https://lists.altlinux.org/mailman/listinfo/community
for file in `find ./ -name lastauth`;do if [ `grep 0.0.0.0 $file`
];then echo $file;fi;done
можно так ;)
Поиск начинается с текущего каталога
--
WBR,
CyberSkunk aka dRuNk Ph!ZiK
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Comm] Bash search
2006-07-25 16:59 [Comm] Bash search Maxim Ivanov
2006-07-25 17:36 ` Olaf Portvineson
@ 2006-07-25 17:39 ` Damir Shayhutdinov
2006-07-25 21:36 ` Dmytro Kovalskyy
2006-07-26 7:45 ` Alexey I. Froloff
3 siblings, 0 replies; 5+ messages in thread
From: Damir Shayhutdinov @ 2006-07-25 17:39 UTC (permalink / raw)
To: ALT Linux Community
> Подскажите пожалуйста, как в каталоге со множеством подкаталогов
> найти все каталоги, в котором лежит файл lastauth, содержащий строку
> 0.0.0.0 ?
find -name lastauth -type f -print0 | xargs -0 grep '0\.0\.0\.0' -lc
-- | sed "s,/[^/]*$,,g"
Вроде так.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Comm] Bash search
2006-07-25 16:59 [Comm] Bash search Maxim Ivanov
2006-07-25 17:36 ` Olaf Portvineson
2006-07-25 17:39 ` Damir Shayhutdinov
@ 2006-07-25 21:36 ` Dmytro Kovalskyy
2006-07-26 7:45 ` Alexey I. Froloff
3 siblings, 0 replies; 5+ messages in thread
From: Dmytro Kovalskyy @ 2006-07-25 21:36 UTC (permalink / raw)
To: ALT Linux Community
grep -R "0.0.0.0" *
Maxim Ivanov сообщил(а):
> Подскажите пожалуйста, как в каталоге со
> множеством подкаталогов
> найти все каталоги, в котором лежит файл
> lastauth, содержащий строку
> 0.0.0.0 ?
>
> Find grep cat - все подойдет, только с
> синтаксисом проблема...
> _______________________________________________
> Community mailing list
> Community@lists.altlinux.org
> https://lists.altlinux.org/mailman/listinfo/community
--
PhD Dmytro Kovalskyy dikov@imbg.org.ua
IMBG of UAS tel:+380445265405
150, Zabolotnogo str, fax:+380445260759
Kiev, 03143 Ukraine mob:+380442019198
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Comm] Bash search
2006-07-25 16:59 [Comm] Bash search Maxim Ivanov
` (2 preceding siblings ...)
2006-07-25 21:36 ` Dmytro Kovalskyy
@ 2006-07-26 7:45 ` Alexey I. Froloff
3 siblings, 0 replies; 5+ messages in thread
From: Alexey I. Froloff @ 2006-07-26 7:45 UTC (permalink / raw)
To: ALT Linux Community
[-- Attachment #1: Type: text/plain, Size: 601 bytes --]
* Maxim Ivanov <ivanov_m@> [060725 21:00]:
> Подскажите пожалуйста, как в каталоге со множеством подкаталогов
> найти все каталоги, в котором лежит файл lastauth, содержащий строку
> 0.0.0.0 ?
find /каталог -name lastauth -print0 | xargs -r0 grep -lF 0.0.0.0
grep -rlF 0.0.0.0 /каталог | grep '/lastauth$'
grep -lF 0.0.0.0 /каталог/**/lastauth
Отсортировано по убыванию эффективности/работоспособности.
--
Regards, Alexey I. Froloff
AIF5-RIPN, AIF5-RIPE
-------------------------------------------
Inform-Mobil, Ltd. System Administrator
http://www.inform-mobil.ru/
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-07-26 7:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-25 16:59 [Comm] Bash search Maxim Ivanov
2006-07-25 17:36 ` Olaf Portvineson
2006-07-25 17:39 ` Damir Shayhutdinov
2006-07-25 21:36 ` Dmytro Kovalskyy
2006-07-26 7:45 ` Alexey I. Froloff
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git