title: execl() find command c
body: <p>I want to execute to the shell the find command to print me only the *.c files
  and then return the string with the files and print it to stdout. 
  I am using pipes to do that. When i try to run i always get <code>find failed: No such file or directory</code></p>
  
  <p>I think the problem is the path.
  the path that i should give it is <code>home/username/Downloads</code> in case i want to print all the *.c files that exist in my Downloads folder??</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  
  int main(int argc, char ** argv){
     int fds[2];
     char buffer[4096];
  
     if(pipe(fds) == -1){
        perror("pipe creation failed");
        exit(1);
     }
  
     switch (fork()){
  
      case 0://child
         close(fds[0]);
         execl("usr/bin/find","find","home/username/Downloads", "-name \"*.c\" -print0",NULL);
         perror("find failed");
         exit(20);
         break;
  
        case -1: //fork failure
         perror("fork failure");
         exit(1);
  
        default: //parent
         close(fds[1]); //close stdin so only can do stdout
         int size= read(fds[0],buffer, 4096);
         printf("%s",buffer);
     }
  
     exit(1);
  }
  </code></pre>