From owner-freebsd-questions@freebsd.org Wed May 6 15:21:34 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 193E22C7DBA for ; Wed, 6 May 2020 15:21:34 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49HL0Y1BY4z3Hvh for ; Wed, 6 May 2020 15:21:32 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([94.222.27.16]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPA (Nemesis) id 1MkHIV-1iqjVC2Kcr-00kcE6; Wed, 06 May 2020 17:21:15 +0200 Date: Wed, 6 May 2020 17:21:15 +0200 From: Polytropon 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> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:GJRmAhDiOh+jmUI/0lletCZTRricyfCF+E/Q7wHck0npiJkhfSy er5359BUCetFngsp/mH9Nm2u5fmNAffB2SgnqaCAK/d6/sdmNNOQet7p7HO2CcV0euj4Vst qYSc9dp/Zh0So/LYxirrsNJxBi8DLk2wpj6NE6Zw/dMCst1AV5sDTHeLQzP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; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@edvax.de has no SPF policy when checking 217.72.192.74) smtp.mailfrom=freebsd@edvax.de X-Spamd-Result: default: False [4.60 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; MV_CASE(0.50)[]; TO_DN_NONE(0.00)[]; HAS_ORG_HEADER(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[tom.com]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(0.32)[ip: (-0.70), ipnet: 217.72.192.0/20(0.32), asn: 8560(2.03), country: DE(-0.02)]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:8560, ipnet:217.72.192.0/20, country:DE]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.88)[0.883,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[0.996,0]; MID_CONTAINS_FROM(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[74.192.72.217.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; RWL_MAILSPIKE_VERYGOOD(0.00)[74.192.72.217.rep.mailspike.net : 127.0.0.19]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_LAST(0.00)[] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 May 2020 15:21:34 -0000 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, ...