title: Check if a file exists in UNIX from SQLplus without UTL_FILE
body: <p>My current scenario is like this:</p>
  
  <ul>
  <li>I need to <strong>login to sqlplus</strong> from a <strong>shell script</strong> to call a <strong>stored procedure</strong>.</li>
  <li>After that I need to create a <strong>CSV</strong> file by SPOOLING data from a table.</li>
  <li>Then I need to <strong>check whether the CSV file has been created</strong> in a particular directory and depending on the result an <strong>update</strong> query needs to be run.</li>
  </ul>
  
  <p>I know that this can be checked within sqlplus with the help of <strong>UTL_FILE</strong> package but unfortunately due to Client policies,the access of this package is <strong>restricted</strong> in  the current system.</p>
  
  <p>Another way is to exit from sqlplus and perform the file check in UNIX and then again log in to sqlplus to perform the rest actions. But this I believe would result in <strong>slower execution time</strong> and <strong>performance</strong> is an important factor in this implementation as the tables contain huge volumes of data(<strong>in millions</strong>).</p>
  
  <p>So is there any other way to check this from sqlplus without exiting from the current session?</p>
  
  <p><strong>System Info:</strong></p>
  
  <p><strong>OS - Red Hat Enterprise Linux</strong></p>
  
  <p><strong>Database - Oracle 11g</strong></p>