Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
large directories
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
tdennist
Tux's lil' helper
Tux's lil' helper


Joined: 11 May 2004
Posts: 145

PostPosted: Tue May 18, 2004 12:05 am    Post subject: large directories Reply with quote

What are the largest directories in a Gentoo system? I'm guessing /usr for one, but what are some other ones? I'm asking so I will know what's a good idea to give a separate partition to. If that makes any sense.

td
_________________
Registered Linux user #356840

Fleens??! YOU'RE not FLEENS! Well, whatever you are....MAKE ME A PIZZA!!?
Back to top
View user's profile Send private message
moocha
Watchman
Watchman


Joined: 21 Oct 2003
Posts: 5722
Location: Cluj-Napoca, Romania

PostPosted: Tue May 18, 2004 12:19 am    Post subject: Reply with quote

For a server, /var. For a desktop, /home.
_________________
Military Commissions Act of 2006: http://tinyurl.com/jrcto

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety."
-- attributed to Benjamin Franklin
Back to top
View user's profile Send private message
tdennist
Tux's lil' helper
Tux's lil' helper


Joined: 11 May 2004
Posts: 145

PostPosted: Tue May 18, 2004 12:20 am    Post subject: Reply with quote

And was I right about /usr? Also, this is a single user computer.
_________________
Registered Linux user #356840

Fleens??! YOU'RE not FLEENS! Well, whatever you are....MAKE ME A PIZZA!!?
Back to top
View user's profile Send private message
moocha
Watchman
Watchman


Joined: 21 Oct 2003
Posts: 5722
Location: Cluj-Napoca, Romania

PostPosted: Tue May 18, 2004 12:28 am    Post subject: Reply with quote

Yes, of course. Unless you're creating a lot of content (or downloading a whole lot of files :D), /usr will take up the most space on any machine.
Note that some software (usually proprietary stuff, like non-open source games, Sun's JRE/JDK and a few others) install into /opt, not into /usr. So you might want to look at that.
At any rate, to see how much a directory takes up, run (from root) something like
Code:
du -sh /home
Substitute /usr, /opt etc etc for /home to check those. Note that the command can take a little while to complete, especially when run on large trees, such as /usr.
_________________
Military Commissions Act of 2006: http://tinyurl.com/jrcto

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety."
-- attributed to Benjamin Franklin
Back to top
View user's profile Send private message
tdennist
Tux's lil' helper
Tux's lil' helper


Joined: 11 May 2004
Posts: 145

PostPosted: Tue May 18, 2004 12:30 am    Post subject: Reply with quote

Cool beans. What exactly is the /opt directory used for, anyway? And what does it stand for?
_________________
Registered Linux user #356840

Fleens??! YOU'RE not FLEENS! Well, whatever you are....MAKE ME A PIZZA!!?
Back to top
View user's profile Send private message
moocha
Watchman
Watchman


Joined: 21 Oct 2003
Posts: 5722
Location: Cluj-Napoca, Romania

PostPosted: Tue May 18, 2004 12:35 am    Post subject: Reply with quote

tdennist wrote:
Cool beans. What exactly is the /opt directory used for, anyway? And what does it stand for?


Read my post again.
As for stand - it's short for "optional"...
_________________
Military Commissions Act of 2006: http://tinyurl.com/jrcto

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety."
-- attributed to Benjamin Franklin
Back to top
View user's profile Send private message
tdennist
Tux's lil' helper
Tux's lil' helper


Joined: 11 May 2004
Posts: 145

PostPosted: Tue May 18, 2004 12:37 am    Post subject: Reply with quote

Ah, "optional" kind of answers both of my questions :p

Thanks.

td
_________________
Registered Linux user #356840

Fleens??! YOU'RE not FLEENS! Well, whatever you are....MAKE ME A PIZZA!!?
Back to top
View user's profile Send private message
moocha
Watchman
Watchman


Joined: 21 Oct 2003
Posts: 5722
Location: Cluj-Napoca, Romania

PostPosted: Tue May 18, 2004 12:41 am    Post subject: Reply with quote

Not necessarily both of them - it's just a name, and it's that name for historical reasons, not for logical ones. Good example of UNIX tradition - "we've always done it that way" :D
Originally it stood for optional, but that doesn't mean it's for "optional software" - whatever that might mean. Aside from the kernel, pretty much any package is optional as there are always alternatives... And take a look at /usr. Comes from user, of course, but it doesn't have anything to do with user files, which land in /home. Or /etc, which holds system configuration. Not very intuitive.
Bottom line is - it's all about convention. If you want to know more about what goes where and why, see the File System Hierarchy Standard.
_________________
Military Commissions Act of 2006: http://tinyurl.com/jrcto

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety."
-- attributed to Benjamin Franklin
Back to top
View user's profile Send private message
tdennist
Tux's lil' helper
Tux's lil' helper


Joined: 11 May 2004
Posts: 145

PostPosted: Tue May 18, 2004 1:02 am    Post subject: Reply with quote

Oh. How unnecessarily confusing :-).

I'll take a look at that link you posted.

td
_________________
Registered Linux user #356840

Fleens??! YOU'RE not FLEENS! Well, whatever you are....MAKE ME A PIZZA!!?
Back to top
View user's profile Send private message
floffe
Guru
Guru


Joined: 24 Nov 2003
Posts: 414
Location: Linköping, Sweden

PostPosted: Tue May 18, 2004 9:10 am    Post subject: Reply with quote

moocha wrote:
And take a look at /usr. Comes from user, of course

*BEEP* USR = Unix System Resources
Back to top
View user's profile Send private message
Deebster
Tux's lil' helper
Tux's lil' helper


Joined: 16 Nov 2003
Posts: 126
Location: Reading, England

PostPosted: Tue May 18, 2004 11:13 am    Post subject: Re: large directories Reply with quote

tdennist wrote:
I'm asking so I will know what's a good idea to give a separate partition to.

/tmp!
A short list of advantages/arguments:

  • Security - Having /tmp as a separate partition allows you to mount it with the options nodev,nosuid,noexec, which stops pretty much all linux attack scripts and worms (most use /tmp to exploit from&/build exploits). Be aware this could break things, although the only app I've ever heard of is Midnight Commander (apparently).
    Portage was vulnerable to a trick with hard sym-links that you could do if your /tmp was on the same partition as /, although iirc that's fixed now.
    Also, having /tmp and /var (/home too, depends) on separate partitions allows you to set / to read-only, although I only bother with that on servers.
  • Data integrity - /tmp is the area most written to, so keeping it on a seperate partition helps guard against corruption of the rest of your files.
  • If you fill up a separate /tmp partition, it doesn't break anything else (like logs and spools in /var). Trying to log on to a system with a full root partition or /var is no fun at all.
    However, this is also an argument against having it separate - running out of space on /tmp is a pain, but so is having all that unused space (for most of the time, anyway). Not so much an issue if you've got a nice big drive and can afford a decent sized /tmp partition.
    On a related note, the 'out of space on my xxx partition' problem is the reason why the Gentoo install guide suggests such a poor partitioning system (hi Sven!).
  • Allows you to mount /tmp using a different fs, like reiser4 or ext2 (fast, stability over crashes not needed) or even tmpfs (uses swap space, Solaris style).
Back to top
View user's profile Send private message
moocha
Watchman
Watchman


Joined: 21 Oct 2003
Posts: 5722
Location: Cluj-Napoca, Romania

PostPosted: Tue May 18, 2004 12:21 pm    Post subject: Reply with quote

floffe wrote:
moocha wrote:
And take a look at /usr. Comes from user, of course

*BEEP* USR = Unix System Resources


Argh :oops:

*goes and hides under a rock for the next couple of years*
_________________
Military Commissions Act of 2006: http://tinyurl.com/jrcto

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety."
-- attributed to Benjamin Franklin
Back to top
View user's profile Send private message
lbrtuk
l33t
l33t


Joined: 08 May 2003
Posts: 910

PostPosted: Tue May 18, 2004 2:36 pm    Post subject: Re: large directories Reply with quote

Deebster wrote:
Having /tmp as a separate partition allows you to mount it with the options nodev,nosuid,noexec, which stops pretty much all linux attack scripts and worms


While at first, setting noexec might seem to be the perfect solution, but it can easily be circumvented. While the shell might not execute something that doesn't have the +x bit set, you can always easily run it though something that will run it.

ie- For a bash script, the cracker can do:

Code:
/bin/sh /tmp/mynastyscript


For a python script (you get the idea):

Code:
python /tmp/mynastyscript


For a binary executable:

Code:
/lib/ld-linux.so.2 /tmp/mynastybinary


True that it adds another level of annoyance and that it might stop some scripted worms, but there's nothing to stop the cracker writing this into the worm script.
Back to top
View user's profile Send private message
Deebster
Tux's lil' helper
Tux's lil' helper


Joined: 16 Nov 2003
Posts: 126
Location: Reading, England

PostPosted: Tue May 18, 2004 3:11 pm    Post subject: Reply with quote

Yup, which is why I wrote "pretty much all", not just "all" :)
Back to top
View user's profile Send private message
Unne
l33t
l33t


Joined: 21 Jul 2003
Posts: 616

PostPosted: Wed May 19, 2004 3:06 am    Post subject: Reply with quote

*BEEP BEEP* http://www.google.com/search?q=usr+%22unix+system+resources%22+retronym
Back to top
View user's profile Send private message
placeholder
Advocate
Advocate


Joined: 07 Feb 2004
Posts: 2500

PostPosted: Wed May 19, 2004 3:27 am    Post subject: Reply with quote

/ is a pretty big directory if you ask me. lol
Back to top
View user's profile Send private message
floffe
Guru
Guru


Joined: 24 Nov 2003
Posts: 414
Location: Linköping, Sweden

PostPosted: Wed May 19, 2004 4:24 pm    Post subject: Reply with quote

Unne wrote:
*BEEP BEEP* http://www.google.com/search?q=usr+%22unix+system+resources%22+retronym

*goes and hides under a HUGE rock for the next couple of years*
Back to top
View user's profile Send private message
moocha
Watchman
Watchman


Joined: 21 Oct 2003
Posts: 5722
Location: Cluj-Napoca, Romania

PostPosted: Wed May 19, 2004 4:27 pm    Post subject: Reply with quote

Hey, go find your own rock, this one's taken :D
_________________
Military Commissions Act of 2006: http://tinyurl.com/jrcto

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety."
-- attributed to Benjamin Franklin
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum