Results 1 to 3 of 3

Thread: how to set cleaning of /tmp folder during boot

  1. #1

    Default how to set cleaning of /tmp folder during boot

    In some previous versions of OpenSuse it was possible to define in /etc/configsys to clear /tmp folder during boot. I see that such an option is missing in Leap42.1 in /etc/sysconfig. How to do set my leap 42.1 to clear /tmp folder during each boot.?

    Thanks,

    veki

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,370
    Blog Entries
    3

    Default Re: how to set cleaning of /tmp folder during boot

    Code:
    # cd /etc/tmpfiles.d
    # cp /usr/lib/tmpfiles.d/tmp.conf .
    and the edit "tmp.conf" to say what you want.

    Here are my changes to that file:
    Code:
    -d /tmp 1777 root root -
    -d /var/tmp 1777 root root -
    +D /tmp 1777 root root 7d
    +d /var/tmp 1777 root root 14d
    The lines starting with "-" are the old values. The lines starting with "+" are the new. The "D" says to delete all on boot. The "7d" or "14d" are for deleting files after so many days. Documentation is found with:
    Code:
    man tmpfiles.d
    openSUSE Leap 15.1; KDE Plasma 5;

  3. #3

    Default Re: how to set cleaning of /tmp folder during boot

    Thanks a lot.

Posting Permissions

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