Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Gentoo Chat
  • Search

large directories

Opinions, ideas and thoughts about Gentoo. Anything and everything about Gentoo except support questions.
Post Reply
  • Print view
Advanced search
18 posts • Page 1 of 1
Author
Message
tdennist
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 145
Joined: Tue May 11, 2004 12:46 pm

large directories

  • Quote

Post by tdennist » Tue May 18, 2004 12:05 am

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!!?
Top
moocha
Watchman
Watchman
Posts: 5722
Joined: Tue Oct 21, 2003 6:45 pm

  • Quote

Post by moocha » Tue May 18, 2004 12:19 am

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
Top
tdennist
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 145
Joined: Tue May 11, 2004 12:46 pm

  • Quote

Post by tdennist » Tue May 18, 2004 12:20 am

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!!?
Top
moocha
Watchman
Watchman
Posts: 5722
Joined: Tue Oct 21, 2003 6:45 pm

  • Quote

Post by moocha » Tue May 18, 2004 12:28 am

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: Select all

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
Top
tdennist
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 145
Joined: Tue May 11, 2004 12:46 pm

  • Quote

Post by tdennist » Tue May 18, 2004 12:30 am

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!!?
Top
moocha
Watchman
Watchman
Posts: 5722
Joined: Tue Oct 21, 2003 6:45 pm

  • Quote

Post by moocha » Tue May 18, 2004 12:35 am

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
Top
tdennist
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 145
Joined: Tue May 11, 2004 12:46 pm

  • Quote

Post by tdennist » Tue May 18, 2004 12:37 am

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!!?
Top
moocha
Watchman
Watchman
Posts: 5722
Joined: Tue Oct 21, 2003 6:45 pm

  • Quote

Post by moocha » Tue May 18, 2004 12:41 am

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
Top
tdennist
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 145
Joined: Tue May 11, 2004 12:46 pm

  • Quote

Post by tdennist » Tue May 18, 2004 1:02 am

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!!?
Top
floffe
Guru
Guru
User avatar
Posts: 414
Joined: Mon Nov 24, 2003 11:28 am
Location: Linköping, Sweden

  • Quote

Post by floffe » Tue May 18, 2004 9:10 am

moocha wrote:And take a look at /usr. Comes from user, of course
*BEEP* USR = Unix System Resources
Top
Deebster
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 135
Joined: Sun Nov 16, 2003 9:38 am

Re: large directories

  • Quote

Post by Deebster » Tue May 18, 2004 11:13 am

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).
Top
moocha
Watchman
Watchman
Posts: 5722
Joined: Tue Oct 21, 2003 6:45 pm

  • Quote

Post by moocha » Tue May 18, 2004 12:21 pm

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
Top
lbrtuk
l33t
l33t
User avatar
Posts: 910
Joined: Thu May 08, 2003 3:02 pm

Re: large directories

  • Quote

Post by lbrtuk » Tue May 18, 2004 2:36 pm

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: Select all

/bin/sh /tmp/mynastyscript
For a python script (you get the idea):

Code: Select all

python /tmp/mynastyscript
For a binary executable:

Code: Select all

/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.
Top
Deebster
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 135
Joined: Sun Nov 16, 2003 9:38 am

  • Quote

Post by Deebster » Tue May 18, 2004 3:11 pm

Yup, which is why I wrote "pretty much all", not just "all" :)
Top
Unne
l33t
l33t
User avatar
Posts: 616
Joined: Mon Jul 21, 2003 4:23 pm
Contact:
Contact Unne
Website

  • Quote

Post by Unne » Wed May 19, 2004 3:06 am

*BEEP BEEP* http://www.google.com/search?q=usr+%22u ... 2+retronym
Top
placeholder
Advocate
Advocate
Posts: 2500
Joined: Sat Feb 07, 2004 12:15 am

  • Quote

Post by placeholder » Wed May 19, 2004 3:27 am

/ is a pretty big directory if you ask me. lol
Top
floffe
Guru
Guru
User avatar
Posts: 414
Joined: Mon Nov 24, 2003 11:28 am
Location: Linköping, Sweden

  • Quote

Post by floffe » Wed May 19, 2004 4:24 pm

Unne wrote:*BEEP BEEP* http://www.google.com/search?q=usr+%22u ... 2+retronym
*goes and hides under a HUGE rock for the next couple of years*
Top
moocha
Watchman
Watchman
Posts: 5722
Joined: Tue Oct 21, 2003 6:45 pm

  • Quote

Post by moocha » Wed May 19, 2004 4:27 pm

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
Top
Post Reply
  • Print view

18 posts • Page 1 of 1

Return to “Gentoo Chat”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Authors
Gentoo is a trademark of the Gentoo Foundation, Inc. and of Förderverein Gentoo e.V.
The contents of this document, unless otherwise expressly stated, are licensed under the CC-BY-SA-4.0 license.
The Gentoo Name and Logo Usage Guidelines apply.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy