当前位置: 首页>>技术教程>>正文


为什么在Ubuntu中这么难找到文件?

,

问题描述

在Ubuntu中很难找到文件。在Windows中,您可以转到C:\Program Files,然后找到所需的内容。在Ubuntu中,您必须使用搜索找到所需的内容。也许我缺少什么?

最佳解决方法

为什么在Ubuntu中这么难找到文件?

直升机的功能类似于hot-air气球吗?

为什么Microsoft Office不能像type-writer一样工作?

此处进行了相同的比较。 Unix(包括Ubuntu)是与Windows(NT)截然不同的平台。新台币是它自己特殊的野兽。用NT范式判断Linux有点类似于使用汽油机技师对柴油机进行故障排除。它们有很多共同点,但也有令人难以置信的差异。

Playing with a cat as though it were a dog, seldom leads to gratification. You must adjust your paradigm to accommodate your platform. Each architecture has specific merits and conventions that you must obey, if you are to avoid pulling back a bloodied nub.

(漫画from here)

“在Windows中,您只需转到C:\Program Files,便会找到所需的内容。” -真的吗?你确定吗? Windows在Registry中存储了一些漂亮的关键内容,这些内容不在Program Files下。 “My Documents”也不在程序文件中,但经常会包含您将要看到的内容。

“在Ubuntu中,您必须使用搜索来找到所需的内容。”是的,如果您首先不知道它在哪里。同样的情况适用于所有地方。现在,我愚蠢的车钥匙在哪里?不,不是在C:\Program Files中..该死! Belgium!

“也许我错过了什么?”大概只是对操作环境中内容管理背后的主要概念的一般介绍。朋友,请让我帮助您学习驯服这种强大的野兽,以便您可以满足计算需求。


介绍在操作环境中如何组织内容

无论您的操作环境如何(Windows,macOS,Linux,办公室桌面),都出现了有助于在系统中组织内容以便于使用和扩展的模式。

常见的system-wide东西

在公司中,这将是策略文档等。在操作系统中,这将是保持事物运行所需的核心文件。在Windows文件结构中,这就是C:\WINDOWS的全部作用。在Unix-based系统中,存在用于这些事物的各种目录/Libraries(Mac OS X)和/etc(Linux)。用户很少(如果有的话)真的需要处理此问题以作一般用途。

User-specific的东西

在办公室中,人们通常有自己指定的工作空间。这些位置存储的是个人专用的文档/内容。

操作系统是相同的。在Windows上,”My Documents”文件夹特定于每个用户,并且仅包含该人的文件。在Linux上,/home /[用户名]专用于此目的。在macOS上,/Users /[用户名]是。

通常,用户的个人空间在其中具有专门用于特定类别的位置。 Windows具有”My Pictures”目录,例如,位于”My Documents”中。在Ubuntu Linux上,您会找到/home /[username] /Pictures-macOS有其明显的等效项。

工具管理

在办公室中,当您需要新工具时,通常会有一个系统来进行管理。我特别在考虑库存。库存通常会保留您所拥有的物品及其状况的标签。

在Windows上=添加/删除程序以及注册表。

在Ubuntu Linux上= apt软件包管理器-使用Synaptic软件包管理器,aptitude或另一个front-end进行apt。

在Mac OS X 10.6+上= App Store(和/Applications)。

变得更加具体

As shamelessly copied from here,在Ubuntu中找到的常规系统目录结构遵循以下约定:

/bin - binary applications (most of your executable files)

/boot - files required to boot (such as the kernel, etc.)

/dev - your devices (everything from drives to displays)

/etc - just about every configuration file for your system

/etc/profile.d - contains scripts that are run by /etc/profile upon login.

/etc/rc.d - contains a number of shell scripts that are run on bootup at different run levels. There is also typically an rc.inet1 script to set up networking (in [Slackware][6]), an rc.modules script to load modular device drivers, and an rc.local script that can be edited to run commands desired by the administrator, along the lines of autoexec.bat in DOS.

/etc/rc.d/init.d - contains most of the initialization scripts themselves on an [RPM][7]-based system.

/etc/rc.d/rc*.d - where “*” is a number corresponding to the default run level. Contains files for services to be started and stopped at that run level. On RPM-based systems, these files are symbolic links to the initialization scripts themselves, which are in /etc/rc.d/init.d.

/etc/skel - directory containing several example or skeleton initialization shells. Often contains subdirectories and files used to populate a new user’s home directory.

/etc/X11 - configuration files for the X Window system

/home - locally stored user files and folders

/lib - system libraries (similar to Program Files)

/lost+found - lost and found for lost files

/media - mounted (or loaded) devices such as cdroms, digital cameras, etc.

/mnt - mounted file systems

/opt - location for “optionally” installed programs

/proc - dynamic directory including information about and listing of processes

/root - “home” folder for the root user

/sbin - system-only binaries (see /bin)

/sys - contains information about the system

/tmp - temporary files

/usr - applications mainly for regular users

/var - mainly logs, databases, etc.

/usr/local/bin - the place to put your own programs. They will not be overwritten with upgrades.

/usr/share/doc - documentation.

General tips on finding stuff in Ubuntu

除非您讨厌自己的脸,否则请了解您正在与哪种动物打交道。

次佳解决方法

如果您需要查找程序的位置,则可以使用which命令。了解Unix file system hierachy-用于配置文件的/etc/,用于全局命令二进制文件的/usr/bin/(以及包含大多数(多)用户实用程序和应用程序的/usr/),这也将有助于理解。您可以从命令行使用locateslocaterlocate来搜索文件。

/home /user与您的文档和设置或/users /user文件夹相同。

这并不难,只是有所不同。

参考资料

本文由Ubuntu问答整理, 博文地址: https://ubuntuqa.com/article/7482.html,未经允许,请勿转载。