Author Topic: [ solved ] Bit of a mess in my /tmp directory  (Read 534 times)

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2428
  • Any Bugs in site?
[ solved ] Bit of a mess in my /tmp directory
« on: January 17, 2013, 05:56:23 AM »
Errrh got a bit too adventurous trying to unsquash a file in /tmp the result is I now have a very untidy looking /tmp.

I admit I have not searched Forum as I am burning some midnight oil on the jolly unsquash problem in the "other thread" which caused me a slip of concentration when a grand kid very energetic climbed my leg to give a helping hand.  The system now booted some time from some odd partition with a weird menu list. This set me back "some time" but have partly recovered from this sidestep.  What fun  ;D

Back to the /tmp cleaning. Some of the directories I could recognise and have deleted them but I have good swag left.  

Can I safely clear everything out of /tmp?  If so does this call for a reboot before carrying on, in a bit of a hurry   ;D
« Last Edit: January 17, 2013, 08:39:49 PM by wedgetail »
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6372
  • I'm going South
Re: Bit of a mess in my /tmp directory
« Reply #1 on: January 17, 2013, 06:29:00 AM »
Errrh got a bit too adventurous trying to unsquash a file in /tmp the result is I now have a very untidy looking /tmp.

I admit I have not searched Forum as I am burning some midnight oil on the jolly unsquash problem in the "other thread" which caused me a slip of concentration when a grand kid very energetic climbed my leg to give a helping hand.  The system now booted some time from some odd partition with a weird menu list. This set me back "some time" but have partly recovered from this sidestep.  What fun  ;D

Back to the /tmp cleaning. Some of the directories I could recognise and have deleted them but I have good swag left. 

Can I safely clear everything out of /tmp?

Yes.

Quote
If so does this call for a reboot before carrying on, in a bit of a hurry   ;D

A reboot is a good idea. It may not always be necessary, but some of your running programs, including your desktop environment, may expect to find their temporary data in /tmp or ~/tmp.
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline menotu

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 15284
  • ┌∩┐(◕_◕)┌∩┐
Re: Bit of a mess in my /tmp directory
« Reply #2 on: January 17, 2013, 06:37:41 AM »
Errrh got a bit too adventurous trying to unsquash a file in /tmp the result is I now have a very untidy looking /tmp.

I admit I have not searched Forum as I am burning some midnight oil on the jolly unsquash problem in the "other thread" which caused me a slip of concentration when a grand kid very energetic climbed my leg to give a helping hand.  The system now booted some time from some odd partition with a weird menu list. This set me back "some time" but have partly recovered from this sidestep.  What fun  ;D

Back to the /tmp cleaning. Some of the directories I could recognise and have deleted them but I have good swag left. 

Can I safely clear everything out of /tmp?

Yes.

Quote
If so does this call for a reboot before carrying on, in a bit of a hurry   ;D

A reboot is a good idea. It may not always be necessary, but some of your running programs, including your desktop environment, may expect to find their temporary data in /tmp or ~/tmp.


+1

I tend to close any applications I have running before doing a cleanup (usually with Bleachbit)

Am I right in thinking that a user can only delete or rename files owned by said user?
PCLinuxOS 32bit KDE 4.10.1; kernel-3.4.11-pclos1.bfs & 64bit 3.2.18bfs; NVidia GeForce 8400GS 1GB 310.19 driver

Sony Vaio SVE1513A4ESI Laptop, Intel Core i5, 2.6GHz, 6GB RAM, 750GB, 15.6" Intel HD Graphics 4000

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2428
  • Any Bugs in site?
Re: Bit of a mess in my /tmp directory
« Reply #3 on: January 17, 2013, 07:27:16 AM »
Thanks both.
Should have remembered about closing applications first is a good idea.

As user I could delete all but about 15 items, some root directories not allowable, had root konsole open.

With root privileges I could delete those remaining, but I am doing a reboot now very soon.   ;D
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2428
  • Any Bugs in site?
Re: Bit of a mess in my /tmp directory
« Reply #4 on: January 17, 2013, 08:38:58 PM »
I have survived a complete clean out, a number of items, counting around 5, depending on activity, has returned as soon as I start up but I am quite happy with the content looks "proper" to me again.

I will mark as solved   :)
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline pags

  • Hero Member
  • *****
  • Posts: 2515
  • Keep it clean.
Re: Bit of a mess in my /tmp directory
« Reply #5 on: January 18, 2013, 09:11:25 AM »
...
Am I right in thinking that a user can only delete or rename files owned by said user?


Yes.  That is what the "sticky" bit is for (the "t"):
Code: [Select]
drwxrwxrwt  15 0 0   320 Jan 18 11:03 tmp/

http://en.wikipedia.org/wiki/Sticky_bit

Offline Tony

  • Hero Member
  • *****
  • Posts: 1737
  • Reasonable works, ...
Re: [ solved ] Bit of a mess in my /tmp directory
« Reply #6 on: January 18, 2013, 10:40:28 AM »
I kind of understand the temptattion to clear the /tmp directory, in  /home/'myuser', but then think heck something must want these files, and leave it be.
If I use Bleachbit it all seems simpler as I don't have to take responsibility and maybe wrongly assume it will be 'intelligent' deciding what to delete.

Which leads to Bleachbit; if I select KDE, or System /temp, generally my desktop will crash (freeze) requiring logging out/in a few times.

I wonder what programs cause this ? Or is it a quirk of using MiniMe ? It's been very hot, please excuse if i've wandered off the track.  ;)
*WIKI --PCLinuxOS  is great - remember to Donate ! -- *Software Updates

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6372
  • I'm going South
Re: [ solved ] Bit of a mess in my /tmp directory
« Reply #7 on: January 18, 2013, 01:38:59 PM »
I kind of understand the temptattion to clear the /tmp directory, in  /home/'myuser', but then think heck something must want these files, and leave it be.

That is precisely why rebooting immediately after you've emptied one of the tmp directories is a good idea.

They are intended for temporary files that don't have to survive a reboot, but those files may be needed by your running programs. If you, on the other hand, find a program that uses the the tmp directories for permanent storage, you've found one buggy program - which I wouldn't trust to do anything right.

Also note that PCC makes it easy to move /temp into RAM, and if you do, it will be emptied every time you shut down your computer.

As some of the more important tmp directories (~/tmp and /var/tmp) used to be symbolic links to /tmp in PCLinuxOS, rebooting would in fact empty all of them. (They still are symlinks on all my systems, but this isn't the default any more. Why? I don't know but I suppose the reason might be security-related. Perhaps It was felt that the sticky bit on /tmp didn't give the users' temporary files the protection they needed.)

Quote
If I use Bleachbit it all seems simpler as I don't have to take responsibility and maybe wrongly assume it will be 'intelligent' deciding what to delete.

Which leads to Bleachbit; if I select KDE, or System /temp, generally my desktop will crash (freeze) requiring logging out/in a few times.

I wonder what programs cause this ? Or is it a quirk of using MiniMe ? It's been very hot, please excuse if i've wandered off the track.  ;)
« Last Edit: January 18, 2013, 01:53:35 PM by Bald Brick »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline Tony

  • Hero Member
  • *****
  • Posts: 1737
  • Reasonable works, ...
Re: [ solved ] Bit of a mess in my /tmp directory
« Reply #8 on: January 19, 2013, 03:23:19 AM »
Thanks for your reply Bald Brick, gives me some info to chew on and ponder.

Regards
*WIKI --PCLinuxOS  is great - remember to Donate ! -- *Software Updates