os x 终端 删除命令
The Terminal utility is a great feature within Macintosh OS X, and with the Panther version OS, standardized on the Bash shell. Bash is one of the most commonly found and popular shells in Unix variants, including Linux.
终端实用程序是Macintosh OS X的一项重要功能,并且具有在Bash shell上标准化的Panther版本的OS。 Bash是Unix变体(包括Linux)中最常见和最受欢迎的shell之一。
Fortunately for those of us who migrate between operating systems on a regular basis, when returning to the Mac, Bash functions much the same as anywhere else.
幸运的是,对于那些定期在操作系统之间进行迁移的人来说,当返回Mac时,Bash的功能与其他地方的功能几乎相同。
If you use OS X as your primary workstation os, you can access local and remote servers with shell access and perform all of your system administration and other efforts from the Terminal. However, there are a few areas unique to the Mac that may come in handy.
如果将OS X用作主要工作站,则可以通过外壳访问本地和远程服务器,并从终端执行所有系统管理和其他工作。 但是,有一些Mac独有的区域可能会派上用场。
For starters, Terminal is found in the Applications folder, within Utilities. if you are using the Terminal to work on your OS X system, some directory structures are mildly different. As an example, several directories are actually aliased inside of /private, such as /etc and /var. To review these, you can type ‘man hier’ in the Terminal for an overview.
对于初学者,可以在实用程序中的“应用程序”文件夹中找到“终端”。 如果使用终端在OS X系统上工作,则某些目录结构会略有不同。 例如,几个目录实际上是/ private内部的别名,例如/ etc和/ var。 要查看这些内容,您可以在终端中输入“ man hier”以进行概述。
Additionally, sudo (the ability to become a superuser for a single command line operation) is automatically on and enabled for the admin user of the machine. In essence, to edit a file that is privileged, a user can type ‘sudo vi /private/etc/httpd/httpd.conf’, is prompted for their admin password and is temporarily elevated to superuser for the event.
此外,sudo(成为单个命令行操作的超级用户的能力)会自动打开并为计算机的admin用户启用。 本质上,要编辑特权文件,用户可以键入'sudo vi /private/etc/httpd/httpd.conf',系统会提示您输入管理员密码,并暂时将其提升为超级用户。
You will also find the files you create on the Mac have resource forks associated with them. The explanation of resource forks is a long one so I will not go into it here – however a great overview can be found on the Wikipedia.
您还将发现在Mac上创建的文件具有与之关联的资源分支。 关于资源分叉的解释很长,因此在这里我将不再赘述,但是可以在Wikipedia上找到很好的概述 。
Normally, these are not an issue, even across platforms as of Panther, with support for Windows-friendly attachments built into the system and Microsoft’s Office more capable of packaging documents for interoperability. However, from a developer or administrator’s perspective, many file operations may occur in the Terminal. Apple has included some utilities to accommodate the resource forks.
通常,即使在Panther这样的跨平台的平台上,这些也不是问题,它支持系统内置的Windows友好附件,并且Microsoft Office更能够打包文档以实现互操作性。 但是,从开发人员或管理员的角度来看,终端中可能会发生许多文件操作。 苹果提供了一些实用程序来容纳资源分支。
For example, one can use traditional shell programs like cp and mv to work with files and directories. However, those files will be copied or moved without resource forks and could potentially lose data or important file information if restored and accessed at a later date.
例如,可以使用cp和mv等传统的shell程序来处理文件和目录。 但是,这些文件将在没有资源派生的情况下被复制或移动,并且如果以后进行恢复和访问,可能会丢失数据或重要的文件信息。
Ditto, CpMac and MvMac resolve these technicalities. The three work much like cp and mv, in that they copy or move files or directories to new locations. Ditto has a handy option for preserving resource forks by using ‘ditto -rsrc sourcefile destinationfile’. CpMac and MvMac automatically preserve metadata and forks when used. One limitation is MvMac does not work across filesystems and volumes other than the one mounted as primary.
同上,CpMac和MvMac解决了这些技术问题。 这三个文件的工作原理类似于cp和mv,它们将文件或目录复制或移动到新位置。 Ditto有一个方便的选项,可以通过使用'ditto -rsrc sourcefile destinationfile'来保留资源派生。 CpMac和MvMac使用时会自动保留元数据和派生。 一个限制是MvMac不能跨文件系统和卷工作,而不能将其作为主文件系统。
For backup purposes, ditto or CpMac will work fine, preserving the important resource data while getting your files and directories moved onto remote filesystems or external volumes such as cd-rw or hard drives.
出于备份目的,同上或CpMac可以正常工作,保留重要的资源数据,同时将文件和目录移动到远程文件系统或外部卷(例如cd-rw或硬盘驱动器)上。
翻译自: https://www.sitepoint.com/the-terminal-in-os-x/
os x 终端 删除命令
相关资源:jdk-8u281-windows-x64.exe