TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Understanding the bin, sbin, usr/bin, usr/sbin Split [pdf]

127 点作者 Somasis大约 10 年前

10 条评论

bobba大约 10 年前
Can we also address .bash_rc, .bash_profile, .profile, /etc/bash.bashrc, disambiguation. I get tired of instructions advising me to put PATH and other modifiers in .bash_profile when that only works for a login shell. Doesn't work, as needed, if you are actually using Linux as your desktop system.
评论 #9555114 未加载
评论 #9556609 未加载
ghshephard大约 10 年前
I personally like the differentiation between &#x2F;sbin (71 files) and &#x2F;usr&#x2F;sbin (195 files) on OpenBSD and &#x2F;bin (42 files) and &#x2F;usr&#x2F;bin (336 files).<p>I don&#x27;t know if it&#x27;s still the case, but at one point, everything required to boot up a system, and get to a ksh prompt, was in &#x2F;sbin and &#x2F;bin, and the only purpose for commands in &#x2F;usr was for user interaction.<p>When mentally modelling the purpose of the commands, it was nice to have that differentiation, particular the &quot;Stuff in &#x2F;usr is really for the user only, not needed to boot a system.&quot;<p>Of course, I have no idea whether that still holds true - but it&#x27;s still a good starting point.
评论 #9555487 未加载
评论 #9555300 未加载
cremno大约 10 年前
&gt;I’m still waiting for &#x2F;opt&#x2F;local to show up...<p>Well, he doesn&#x27;t have to wait anymore:<p><a href="https:&#x2F;&#x2F;trac.macports.org&#x2F;wiki&#x2F;FAQ#defaultprefix" rel="nofollow">https:&#x2F;&#x2F;trac.macports.org&#x2F;wiki&#x2F;FAQ#defaultprefix</a><p>&gt;Why is &#x2F;opt&#x2F;local the default install location for MacPorts?
frik大约 10 年前
There are&#x2F;were small Linux distro that fit on a 3.5&quot; floppy diskette. I remember one that required just a single floppy disk to boot and a later version came with a second floppy with additional applications. So the bin &#x2F;usr&#x2F;bin split was still useful in the early Linux era (I used such a floppy Linux til 2002 for misc purposes). A starting point: <a href="http:&#x2F;&#x2F;superuser.com&#x2F;questions&#x2F;130457&#x2F;what-linux-fits-on-a-floppy-disk" rel="nofollow">http:&#x2F;&#x2F;superuser.com&#x2F;questions&#x2F;130457&#x2F;what-linux-fits-on-a-f...</a>
egwynn大约 10 年前
The reasons for the complexity are lame, but sometimes there are nice consequences. For instance, on FreeBSD you can pretty much just nuke <i>&#x2F;usr&#x2F;local&#x2F;</i> and be left with a functional base-system (broken configs notwithstanding).
ChuckMcM大约 10 年前
Interesting rant. Actually in 1990 people were complaining that SunOS took up too much disk space (well they always complained but whatever). And C (and unix) always had something of a naming &#x2F; packaging problem.<p>Of course long after the size of disks were &quot;big enough&quot; to hold everything in &#x2F; putting things on different drives gave you more disk I&#x2F;O&#x27;s to play with and improved overall system performance. If you could get small drives today you could play with that yourself but it seems silly to have a 500GB disk mounted on &#x2F;var&#x2F;log :-).<p>But more importantly for me over the years was putting the &quot;OS&quot; required user land stuff in one place and the &quot;rest&quot; of it in another place meant I could replace the kernel and userland code independently of restoring home directories and what not. These days I do that by mounting &quot;my&quot; stuff via NFS and making my servers basically completely replaceable with a re-imaging.
brandonmenc大约 10 年前
The original version:<p><a href="http:&#x2F;&#x2F;lists.busybox.net&#x2F;pipermail&#x2F;busybox&#x2F;2010-December&#x2F;074114.html" rel="nofollow">http:&#x2F;&#x2F;lists.busybox.net&#x2F;pipermail&#x2F;busybox&#x2F;2010-December&#x2F;074...</a><p>I make everyone I hire and&#x2F;or work with read it.
评论 #9557152 未加载
GutenYe大约 10 年前
Well, Arch Linux simplify them all, everything is in usr&#x2F;bin and others just symlink to usr&#x2F;bin.
评论 #9555572 未加载
评论 #9555578 未加载
评论 #9554920 未加载
DougMerritt大约 10 年前
It gets the &#x2F;sbin part wrong.<p>&#x2F;sbin and &#x2F;usr&#x2F;sbin&#x2F; did not exist in the 1970s at all, let alone in the early 1970s.<p>I&#x27;m not sure exactly which system it first appeared in, but on BSD, which originally was add-ons to the Bell Labs distribution, it was not present in the 1986 4.3 BSD but did appear in the 1993 4.4 BSD.<p>You can verify that, and search for it on other early Unixes, here, for instance:<p><a href="http:&#x2F;&#x2F;minnie.tuhs.org&#x2F;cgi-bin&#x2F;utree.pl" rel="nofollow">http:&#x2F;&#x2F;minnie.tuhs.org&#x2F;cgi-bin&#x2F;utree.pl</a>
davidw大约 10 年前
See also: Filesystem Hierarchy Standard:<p><a href="https:&#x2F;&#x2F;wiki.debian.org&#x2F;FilesystemHierarchyStandard" rel="nofollow">https:&#x2F;&#x2F;wiki.debian.org&#x2F;FilesystemHierarchyStandard</a>