我需要比较两个文件(不是同一个文件的两个版本,但是它们由 git 跟踪,但这无关紧要)并且我想要一些彩色输出,我该如何实现?
$ diff file_1 file_2
1,9d0
< <script ... >
< // more code
< </script>
$
Run Code Online (Sandbox Code Playgroud)
上面的代码向我展示了这些文件之间的区别,但是没有任何颜色。对于难以阅读的较长差异。
或者,有没有办法让 git(我确实有很好的颜色输出)来区分两个不同的文件(而不是对文件的更改)?
OSX (10.7.5)
我需要为本地站点创建一个新的 mySQL 数据库,我想我会用 phpMyAdmin 来做,所以我安装了这个包,如下所示:
sudo apt-get install phpmyadmin
在此过程中,我收到了几个提示,其中一个是:
The phpmyadmin package must have a database installed and configured before it can be used.
This can be optionally handled with dbconfig-common.
Run Code Online (Sandbox Code Playgroud)
我决定使用 dbconfig-common。
然后我被要求提供管理帐户的密码来创建 MySQL db/user:
Password of the database's administrative user:
这是sudo密码吗?我以为我正在设置密码,所以我写了我的新密码。
An error occurred while installing the database:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Run Code Online (Sandbox Code Playgroud)
收到此错误后,我被要求重试,并使用各种密码执行此操作,无论我选择什么,都会使我回到此提示。
我所做的研究并没有解释这里的预期,而是建议修改配置文件。有任何想法吗?
Ubuntu 13.105.5.35-0ubuntu0.13.10.1 (Ubuntu)