Results 1 to 6 of 6

Thread: Clearing files

  1. #1
    Join Date
    Jul 2010
    Location
    Cape Town
    Posts
    67

    Default Clearing files

    I'm lost! Since my little episode when I was brain dead for about 35 minutes my memory is somewhat defunctive.
    My other PC has ground to a halt as the tmp file is full: "/tmp out of disk space" & "KDE unable to start". I have scoured commands and can't find how to clear all the junk apart from move it somewhere else which seems a bit silly. Help!

  2. #2

    Default Re: Clearing files

    The following command will delete *everything* in /tmp:
    Code:
    su -c 'rm -R /tmp/*'
    At your own risk!

  3. #3
    Join Date
    Aug 2008
    Location
    Seattle, WA
    Posts
    1,376

    Default Re: Clearing files

    Quote Originally Posted by please_try_again View Post
    The following command will delete *everything* in /tmp:
    Code:
    su -c 'rm -R /tmp/*'
    At your own risk!
    It wouldn't be a bad idea to do this on a reboot. This will end any processes using files in /tmp.

  4. #4

    Default Re: Clearing files

    • boot in runlevel 1 (append 1 in boot options line at Grub menu screen)
    • log in with root password
    • type the following:
      Code:
      cd /etc/sysconfig
      cp cron cron.bak
      sed -i '/CLEAR_TMP_DIRS_AT_BOOTUP/s/no/yes/' cron
    • reboot
      Code:
      shutdown -r now

  5. #5
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,996
    Blog Entries
    14

    Default Re: Clearing files

    Quote Originally Posted by please_try_again View Post
    • boot in runlevel 1 (append 1 in boot options line at Grub menu screen)
    • log in with root password
    • type the following:
      Code:
      cd /etc/sysconfig
      cp cron cron.bak
      sed -i '/CLEAR_TMP_DIRS_AT_BOOTUP/s/no/yes/' cron
    • reboot
      Code:
      shutdown -r now
    One can also achieve this by adding "3" at the boot options line, at console login prompt login with username and password, then do "su -c yast". Once in Yast, go to System - Sysconfigeditor, search for TMP, and set the TMP dirs to be cleared at each boot.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  6. #6
    Join Date
    Jul 2010
    Location
    Cape Town
    Posts
    67

    Default Re: Clearing files

    Thanks all! I am having to write all down these days - will keep these tips.

Posting Permissions

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