grep /home/user/dir -d recurse -H \b(?:(?:25[0-5]|2[0-4][0-9]|[01]? [0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b
the ugly looking block matches IP address. GREP is a gnu regex utility in linux (also available for windows). /home/user/dir is the location of the directory -d recurse, tells grep to use all files in the directory -H prints the names of the file(s) that the said expression matched. On Sep 19, 2:30 pm, bittu <shashank7andr...@gmail.com> wrote: > Linux shell command to find all files in a directory which contain ip > addresses -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.