Re: how can I solve this grep problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Sep 13, 2015 at 8:20 PM, Özkan Pakdil <ozkan.pakdil@xxxxxxxxx> wrote:
> Hello
>
> I was searching some strings in my disk yes I mean whole disk like this
>
> find / -type f -exec grep -sl "access denied" {} \;

This is a bad idea on many levels.

1. This is the wrong list for such requests and you're lucky to get any reply.
2. You were searching for 40 hours.  You should optimize the search,
and narrow it down.  Do this instead:

find <list-of-directories> -type f | xargs grep -sl "access denied"

where <list-of-directories> excludes /sys, /proc, /dev and other
directories that it might not make sense to search.

Good luck! :)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]