<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1019841" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1019841</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-management/shell-script-help#comment-1120382</link>
    <description> &lt;p&gt;BTW, the way the script is configured above, it will copy the file(access_log)&lt;br /&gt;
FROM: /home/maxalbert.com/logs/access_log&lt;br /&gt;
TO: /home/maxalbert.com/test/YYYY_MM_DD/access_log&lt;/p&gt;
&lt;p&gt;You can pass the FROM and TO as arguements to the shell script.  And/Or configure the script to use a certain file and path for default values.&lt;/p&gt;
&lt;p&gt;CRON is probably the best way to do it (as FunkyJ mentioned). Try to run it just before they prun the file.&lt;/p&gt;
 </description>
     <pubDate>Mon, 02 Dec 2002 02:46:06 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1120382 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-management/shell-script-help#comment-1120366</link>
    <description> &lt;p&gt;Make sure your provide allows cron jobs so that you can schedule the task.&lt;/p&gt;
 </description>
     <pubDate>Sun, 01 Dec 2002 23:25:59 +0000</pubDate>
 <dc:creator>FunkyJ</dc:creator>
 <guid isPermaLink="false">comment 1120366 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-management/shell-script-help#comment-1120357</link>
    <description> &lt;p&gt;I just wrote this up.  I tested it on my system (paths still in the code) and it works fine as long as you only do one file at a time (you can&#039;t use *).&lt;/p&gt;
&lt;p&gt;usage:&lt;br /&gt;
filename [source file [destination directory]]&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;#!/bin/sh&lt;br /&gt;&lt;br /&gt;if [ $# -gt 0 ]; then&lt;br /&gt;&amp;nbsp; source_file=$1&lt;br /&gt;else&lt;br /&gt;&amp;nbsp; source_file=/home/maxalbert.com/logs/access_log&lt;br /&gt;fi&lt;br /&gt;&lt;br /&gt;if [ $# -gt 1 ]; then&lt;br /&gt;&amp;nbsp; dest_dir=$2&lt;br /&gt;else&lt;br /&gt;&amp;nbsp; dest_dir=/home/maxalbert.com/test&lt;br /&gt;fi&lt;br /&gt;&lt;br /&gt;day_stamp=`date +%Y_%m_%d`&lt;br /&gt;filename=`echo $source_file | awk -F/ &amp;#039;{print $NF}&amp;#039;`&lt;br /&gt;&lt;br /&gt;dest_dir=&amp;quot;$dest_dir/$day_stamp/&amp;quot;&lt;br /&gt;&lt;br /&gt;if [ ! -d $dest_dir ]; then&lt;br /&gt;&amp;nbsp; mkdir -p $dest_dir&lt;br /&gt;fi&lt;br /&gt;&lt;br /&gt;cp $source_file &amp;quot;$dest_dir/$filename&amp;quot;&lt;br /&gt;&lt;br /&gt;exit 0;&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
 </description>
     <pubDate>Sun, 01 Dec 2002 20:40:11 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1120357 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
