Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 May 2020 17:21:15 +0200
From:      Polytropon <freebsd@edvax.de>
To:        malaizhichun@tom.com
Cc:        freebsd-questions@freebsd.org
Subject:   Re: redesignde the unix-like system directory
Message-ID:  <20200506172115.cb3b572b.freebsd@edvax.de>
In-Reply-To: <83788746a7d8a802d8af4b582e00827166febd1a.camel@tom.com>
References:  <83788746a7d8a802d8af4b582e00827166febd1a.camel@tom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 06 May 2020 20:16:43 +0800, kindu smith wrote:
> Borrowing android and freebsd just to keep it simple:
> 
> /app, application directory, various system-level applications
> /boot,  boot directory, set up ABI, API, EFI, kernel, modules and other
> directories to store complete microkernel boot source code, interface,
> EFI partition information, modules.
> /cloud, various cloud applications
> /data,  database, such as key, web page data
> /help,  operating system manual
> /net,  network information and server information, etc.
> /system , store the file system hierarchy (FHS) directory
> /user,  user directory, set user account and information

That leaves so many common use cases for FreeBSD with tons
of question marks... ;-)

See "man 7 hier" for why things are laid out on FreeBSD in
a specific, logical, and predictable (!) way. There are
certain things that have historical reasons and still bear
the respective names, but essentially, those are just a set
of termini technici, some of them are universal in the IT
area, others are UNIX-specific (such as "core dump" without
any core memory, /dev/drum without a drum memory, or the
distinction between sequential and direct access...).

Furthermore, this just would be about FreeBSD, the operating
system. What about the installed application programs? What
about programs installed and managed out of the scope of pkg?
What about user-specific (user-local) programs? And libraries?
Header files? Sources? Where do mounted filesystems go? Backup
directories? Or what about the temporary directories? Those
are missing altogether.

It's of course a great idea if you want to simplify something.
However, it's hard to simplify something that is as complex
as an operating system. Nowadays, web browsers have reached
the same level of complexity like a whole OS, even though they
are "just" "simple" application programs.

FreeBSD's general organisation keeps all non-OS stuff stored
in /usr/local; the directories owned by the OS have a specific
purpose which is reflected by their name and location. User
data lives in /home, usually one subdirectory per user. Stuff
not managed by the OS is often located in /opt, a Solaris-ism
borrowed by Linux as well.

Again, I really suggest reading the manual page "hier" which
describes the directory hierarchy on FreeBSD:

	https://www.freebsd.org/cgi/man.cgi?hier(7)

I think you can easily see that the complexity in this design
reflects the complexity of the operating system.

Keep in mind that a halfway skilled BSD admin can immediately
predict where some file will be, and given a specific path, he
can tell you what it is for. ;-)


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200506172115.cb3b572b.freebsd>