<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error in outputcsv command: could not write to file in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/Error-in-outputcsv-command-could-not-write-to-file/m-p/87937#M1997</link>
    <description>&lt;P&gt;Indeed, I meant to have outputcsv there.&lt;/P&gt;

&lt;P&gt;outputcsv doesn't require a lookup table to be created though. I think you're thinking of outputlookup.&lt;/P&gt;

&lt;P&gt;It works if I give it a relative path like "filename.csv", but not an absolute path. I'm trying to automate delivery of reports to a shared drive.&lt;/P&gt;</description>
    <pubDate>Tue, 09 Apr 2013 06:37:59 GMT</pubDate>
    <dc:creator>dbryan</dc:creator>
    <dc:date>2013-04-09T06:37:59Z</dc:date>
    <item>
      <title>Error in outputcsv command: could not write to file</title>
      <link>https://community.splunk.com/t5/Reporting/Error-in-outputcsv-command-could-not-write-to-file/m-p/87935#M1995</link>
      <description>&lt;P&gt;Related to &lt;A href="http://splunk-base.splunk.com/answers/4266/outputlookup-command-could-not-write-to-file"&gt;this question&lt;/A&gt;: &lt;/P&gt;

&lt;P&gt;When I run:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search * | head 10 | /home/splunk/test/aaa.csv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I see this error:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Could not write to file '/home/splunk/test/aaa.csv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;More info:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Splunk is running as the owner of the directory&lt;/LI&gt;
&lt;LI&gt;the owner has read and write permissions&lt;/LI&gt;
&lt;LI&gt;the directory is on the same filesystem as $SPLUNK_HOME&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Anyone have any idea what this could be?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2013 01:58:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Error-in-outputcsv-command-could-not-write-to-file/m-p/87935#M1995</guid>
      <dc:creator>dbryan</dc:creator>
      <dc:date>2013-04-09T01:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: Error in outputcsv command: could not write to file</title>
      <link>https://community.splunk.com/t5/Reporting/Error-in-outputcsv-command-could-not-write-to-file/m-p/87936#M1996</link>
      <description>&lt;P&gt;Have you created the csv lookup file under &lt;BR /&gt;
manager -&amp;gt; lookups -&amp;gt; lookup table files -&amp;gt; new ?&lt;/P&gt;

&lt;P&gt;Also, I think your syntax is wrong, and what you actually want to type is &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search * |head 10| outputcsv csvfilename.csv 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;csvfilename.csv being the name of the file you created in the first step.  &lt;/P&gt;

&lt;P&gt;See if that works for you.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2013 03:00:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Error-in-outputcsv-command-could-not-write-to-file/m-p/87936#M1996</guid>
      <dc:creator>stephenho</dc:creator>
      <dc:date>2013-04-09T03:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: Error in outputcsv command: could not write to file</title>
      <link>https://community.splunk.com/t5/Reporting/Error-in-outputcsv-command-could-not-write-to-file/m-p/87937#M1997</link>
      <description>&lt;P&gt;Indeed, I meant to have outputcsv there.&lt;/P&gt;

&lt;P&gt;outputcsv doesn't require a lookup table to be created though. I think you're thinking of outputlookup.&lt;/P&gt;

&lt;P&gt;It works if I give it a relative path like "filename.csv", but not an absolute path. I'm trying to automate delivery of reports to a shared drive.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2013 06:37:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Error-in-outputcsv-command-could-not-write-to-file/m-p/87937#M1997</guid>
      <dc:creator>dbryan</dc:creator>
      <dc:date>2013-04-09T06:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: Error in outputcsv command: could not write to file</title>
      <link>https://community.splunk.com/t5/Reporting/Error-in-outputcsv-command-could-not-write-to-file/m-p/87938#M1998</link>
      <description>&lt;P&gt;Outputcsv will only write files to splunk's var/run/splunk directory, for security reasons. It will not write to arbitrary file system locations. You could, I believe, create a symlink (or hard link) to a directory under there and write to that location however.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2013 07:17:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Error-in-outputcsv-command-could-not-write-to-file/m-p/87938#M1998</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2013-04-09T07:17:35Z</dc:date>
    </item>
  </channel>
</rss>

