LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-03-2004, 06:03 AM   #16
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76

I just thought of something.

When you mount a filesystem, it “hides” any files that were there before, so if you just enter the line in fstab, and reboot (or just run “mount” for that mount-point), the original contents of the directory will still be there, just hidden under the tmpfs mount. You won't actually save any disk space unless you delete the files:

Code:
umount /tmp
rm -rf /tmp/*
mount /tmp
I recommend doing this in single-user mode for /tmp/ (or even booted off a rescue disk), as it reduces the chance of anything using the files you're trying to delete.

Obviously, for a new directory like /home/guest, there'll be nothing there to need deleting, so you don't have to bother with that.

— Robert J. Lee
 
Old 08-04-2004, 10:47 PM   #17
perry
Member
 
Registered: Sep 2003
Location: USA & Canada
Distribution: Slackware 12.0
Posts: 978

Original Poster
Rep: Reputation: 30
editing /etc/rc.d/rc.local

to automate the mounting of /home/guest i make some changes to /etc/rc.d/rc.local

Code:
#!/bin/sh
#
# /etc/rc.d/rc.local:  Local system initialization script.
#
# Put any local setup commands in here:

#echo Clearing /tmp directory...
#rm -rf /tmp/*

echo Mounting /home/guest
mount /home/guest

cp    /home/keep_guest/.bashrc          /home/guest/.bashrc
cp    /home/keep_guest/.bash_profile    /home/guest/.bash_profile
#ln -s /home/keep_guest/.gconf           /home/guest/.gconf
#ln -s /home/keep_guest/.gconfd          /home/guest/.gconfd
#ln -s /home/keep_guest/.gnome           /home/guest/.gnome
#ln -s /home/keep_guest/.gnome2          /home/guest/.gnome2
#ln -s /home/keep_guest/.gnome2_private  /home/guest/.gnome2_private
#ln -s /home/keep_guest/.metacity        /home/guest/.metacity
#ln -s /home/keep_guest/.nautilus        /home/guest/.nautilus
the cp and ln commands were attempts at setting some values that could be remembered, but it ended up being a permissions nitemare so i abandoned the idea...

i've been using this setup now for over a week and with 512 mb on my system, i'm noticing no differences whatsoever...

to me, the guest account is the best way to surf the internet and not have to worry about caches and the like, which is good, winblows can have their anti-virus, anti-spyware, anti-popup, anti-cache and everything else, for me, i'll stick with my tmpfs....

way to go Linux!

- perry
 
Old 08-06-2004, 06:05 PM   #18
perry
Member
 
Registered: Sep 2003
Location: USA & Canada
Distribution: Slackware 12.0
Posts: 978

Original Poster
Rep: Reputation: 30
Slight change...

It's been recommended that I make a couple changes to the /etc/fstab entries:

from:
Code:
tmpfs            /tmp             tmpfs       auto,rw
tmpfs            /home/guest      tmpfs       auto,rw
to:
Code:
none             /tmp	          tmpfs	      defaults         0   0
none             /home/guest      tmpfs	      nosuid,nodev,rw  0   0
not only does this work fine, but there seems to be an extra 100 mb free in my main memory (according to what gkrellm is reporting anyway)

cheers

- perry

Last edited by perry; 08-06-2004 at 06:08 PM.
 
Old 08-12-2004, 11:35 AM   #19
perry
Member
 
Registered: Sep 2003
Location: USA & Canada
Distribution: Slackware 12.0
Posts: 978

Original Poster
Rep: Reputation: 30
tmpfs rocks!

I gotta say, I've been test riding this tmpfs for my /tmp & /home/guest now for a couple of weeks and I think it rocks! Would strongly recommend it to anyone who wants to keep Internet junk to a minimum!

cheers

- perry
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tmp full- KDE won't start Trio3b Mandriva 2 11-04-2005 09:02 AM
kde, /tmp, /var/tmp and all that garba Linux - Software 4 06-17-2005 12:31 PM
"/tmp/sv001.tmp/setup.bin" error while installing OO1.1.0 Choey Linux - Software 0 09-16-2003 04:52 PM
Numerous scb_*.tmp files in /tmp dburk Programming 3 08-18-2003 04:28 PM
Newbie question - /tmp /var/tmp Mr happy Linux - Security 3 01-27-2003 01:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration