Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here is an example that will explain better:

enter image description here

I have a selected the audio driver from the picture and i would like to browse through its source. How do i get to the path of the source files from here?

enter image description here

share|improve this question
up vote 8 down vote accepted

You have to use grep -r CONFIG_SND_SOC_MXS_SGTL5000.

Each of these config options just represents a #define macro. Many of them don't belong to a single file but instead are checked in multiple source files. CONFIG_64BIT for example appears in around 1k source code files.

share|improve this answer
grep -r is generally safer to use since it doesn't follow symlinks (which can create an infinite loop). Also with a self contained directory tree like the kernel, -R would search symlinked files multiple times. – Graeme Mar 3 '14 at 10:05
@Graeme Thanks! I edited my answer. – scai Mar 3 '14 at 10:17
grep -r CONFIG_SND_SOC_MXS_SGTL5000 ./ For starting from the current directory – Alan Mar 3 '14 at 10:46
And if you've got many of them to search for, you could use cscope for instance to index your source tree first (there's also a nice integration of cscope in vim). – Stéphane Chazelas Mar 3 '14 at 10:54
It might also control whether a file is even compiled, without appearing inside it. – vonbrand Mar 3 '14 at 14:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.