Create a new directory in /var/log/

Martin Langhoff martin.langhoff at
Mon Oct 18 10:41:06 EDT 2010

On Mon, Oct 18, 2010 at 9:22 AM, Daniel Castelo
<dcastelo at> wrote:
> We want to register some events in /var/log/new_dir, if I create the
> directory "new_dir" manually and then I restart the machine the directory is
> deleted.
> I imagine that I have to define the structure of /var/log in a different
> place.
> Do you have any idea?

It's on a tmpfs. I think that any program that wants its own
/var/log/foo needs to create it (if missing) in its init script. So
/etc/init.d/foo is the place.

Put in there...

   mkdir -p /var/log/foo

which should do the right thing...

 martin.langhoff at
 martin at -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first

More information about the Devel mailing list