title: open() function in C
body: <p>After opening a directory, I wanna check if a command (such as ls) resides within a given directory but open returns an integer i think.. after tokenization, I'm left with some directories... so what can i do?? I was told to use only open() function :((  </p>
  
  <pre><code>int       Account_Master;
      .  .  .
    Account_Master = open ("accounts.dat", O_RDONLY);
    if (Account_Master &gt;0) {
      printf ("Open succeeded.\n");
  </code></pre>
  
  <p>this is the example i used.. whats the point of opening a file if no use?</p>