Linux – web site to search in the file contents of default installations of different linux distributions

distrosfileslinuxsearchweb

The text string "Network services, Internet style" is found in
the first line of the file /etc/services on a computer running Ubuntu 11.04

erik@laptop:~$ head -1 /etc/services
# Network services, Internet style

Do you know if there is some web site where you could query for the text string "Network services, Internet style" and then find out in which Linux distributions and in which files that text string occurs.

I understand that the file tree and file contents of a Linux installation will be different dependent of how you answer the questions during the installation but it would be useful to be able to query a default installation.

The usefulness of searching for the text string "Network services, Internet style" is hard to see, but it is just meant to be seen as an example of what such a web page should be able to search for.

Update: Here are some use cases for such a web site:

If you for instance have been editing a configuration file somewhere under /etc but you forgot how the original version of the configuration file looked like, you could use such a web site (if the web site also let you search for a filename). Most (or maybe all) Linux distributions provide a package system (e.g. rpm and deb) where you could find out the original file content of the configuration file by querying the package system. But that has a higher learning curve than it is to visit a web page.

Sometimes a configuration file may be located under different paths on different Linux distributions. If you know some text string that is to be found inside the configuration file, you could easily find out the path to the filename under different Linux distribution (and also the default file content) by querying the web site.

Best Answer

well, opengrok for opensolaris code base but no opengrok for linux codebase, one could start one however but the cost involved in setting up and maintaining is too greater I suppose. kernel.org maintains only kernel source tarballs. It has been left to the individual distro maker to distribute source code along with the product OS but practices are seldom distribute the source along with the code(I guess debian is an exception and thats why it provides more than 20-30 disks)

There is this : http://lxr.linux.no/

LXR (formerly "the Linux Cross Referencer") is a software toolset for indexing and presenting source code repositories. LXR was initially targeted at the Linux source code, but has proved usable for a wide range of software projects.

Update: Another link I came across is http://fxr.watson.org/ , which has all the popular distro sources cross reference. Pretty useful for systems programmers.

Related Question