Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: clear tmp dirs at bootup?

  1. #11
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: clear tmp dirs at bootup?

    On 2013-07-16 22:06, JJMT wrote:

    >
    > robin_listas;2572237 Wrote:
    >>
    >> So, as /tmp is not a tmpfs in openSUSE, there are some important
    >> differences:
    >>
    >> /tmp is not cleared at boot.
    >> /tmp/systemd-private-* are not cleared at boot.

    >
    > But, given when you've said about /tmp being mounted upstream as a ram
    > disk, I presume it is possible to delete everything without any adverse
    > consequences? These systemd-private-* files are a mystery to me.....


    Just consider them as some files/directories that systemd uses for
    purposes of its own, which you should not delete while the system is
    running.

    >
    > Anyway, it looks like what I want to do is first
    >
    >
    > Code:
    > --------------------
    > > # mkdir -p /etc/systemd/system/local-fs.target.wants
    > > # ln -s /usr/lib/systemd/system/tmp.mount /etc/systemd/system/local-fs.target.wants/tmp.mount

    > --------------------


    huh... why?


    > Second edit my etc/tmpfiles.d/tmp.conf file to reduce the number of
    > days that files sit around. And finally, to deal with the
    > systemd-private-* files, I need to create a file called
    > /etc/tmpfiles.d/remove-systemd-private.conf with the content listed
    > above.



    The "R" does:

    R
    Recursively remove a path and all its subdirectories
    (if it is a directory). Lines of this type accept
    shell-style globs in place of normal path names.

    (man tmpfiles.d)



    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)

  2. #12
    Join Date
    Jun 2008
    Location
    Rural Australia
    Posts
    289

    Default Re: clear tmp dirs at bootup?

    Using GNOME, so copy to, then gedit change the new /etc/tmpfiles.d/tmp.conf setting of /tmp to 15d and of /var/tmp to 30d avoids them filling up with over a month old, without losing most things regularly used ?


    Result:
    Code:
    d /tmp 1777 root root 30d
    d /var/tmp 1777 root root 30d

  3. #13
    Join Date
    Jun 2008
    Location
    Rural Australia
    Posts
    289

    Default Re: clear tmp dirs at bootup?

    Please IGNORE (or remove) my earlier post, as not accurate...

    Quote Originally Posted by paulparker View Post
    Using GNOME, so copy to, then gedit change the new /etc/tmpfiles.d/tmp.conf setting of /tmp to 15d and of /var/tmp to 30d avoids them filling up with over a month old, without losing most things regularly used ?


    Result:
    Code:
    d /tmp 1777 root root 30d
    d /var/tmp 1777 root root 30d

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •