观看视频(https://vimeo.com/56166857 & https://www.youtube.com/watch?v=9CTfGS0gEOk @ 1m:34s),主持人(TJ Holowaychuk)写道:
touch !!:2{...}
Run Code Online (Sandbox Code Playgroud)
我!!:2
在任何地方都找不到什么意思。
我得到(重复上一个命令)!!
但是,的含义
!!:2
Run Code Online (Sandbox Code Playgroud)
我不知道,找不到答案,这里的搜索没有返回任何结果,所以......我被卡住了。
语境:
为了一次创建多个目录,他写道:
mkdir -p lib/{login,signup,users,posts}
Run Code Online (Sandbox Code Playgroud)
为了在每个目录中创建相同的文件,他写道:
touch !!:2/{package.json,index.json}
Run Code Online (Sandbox Code Playgroud)
输出是:
touch lib/{login,signup,users,posts}/{package.json,index.json}
Run Code Online (Sandbox Code Playgroud)
结果是:
这两个文件是在每个目录中创建的。
我被这个更新终止错误难住了。
此错误会压缩所有更新,直到我在更新存储库上禁用 gpgcheck。IE /etc/yum.repos.d/CentOS-Base.repo|[更新].gpgcheck=0
它发生在我拥有的每台机器上 - 起初我以为这是一个“宠物/雪花”类型的问题,但不,它影响了整个牛群。
warning: /var/cache/yum/x86_64/7/updates/packages/scap-security-guide-0.1.36-9.el7.centos.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID f533f4fa: NOKEY
Public key for scap-security-guide-0.1.36-9.el7.centos.noarch.rpm is not installed
scap-security-guide-0.1.36-9.el7.centos.noarch.rpm | 4.4 MB 00:00:03
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
The GPG keys listed for the "CentOS-7 - Updates" repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.
Failing package is: scap-security-guide-0.1.36-9.el7.centos.noarch
GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Run Code Online (Sandbox Code Playgroud)
gpg --quiet --with-fingerprint /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
显示正确的指纹。 …
我在 Windows 10 上工作。
我使用 PuTTY ssh 进入物理:CentOS7、虚拟机:CentOS6,7 和 Ubuntu 16。
第一次 ssh 从 Win TO vb:Ubuntu 时,我得到的是常规 ole 服务器/指纹,而不是已知主机弹出窗口。没什么大不了。但我想知道:我如何确认不存在“中间人”?
最简单的情况:我坐在目标(从这里开始称为“本地”)前面并直接检查其指纹。
事实证明:尝试在 Ubuntu 16 上使用ssh-keygen -lf <filename>
(file:)本地查看公共机器密钥指纹/etc/ssh/ssh_host_rsa_key.pub
给了我一个指纹,我无法与来自远程 ssh 的任何警告进行匹配。
在任何地方,我的意思是:
"2048 SHA256:NPAUL **** 4QQ user@example.com (RSA)"
不是 PuTTy 弹出窗口中出现的内容,并且当我将 pub 密钥文件复制到 CentOS6 或 7 并ssh-keygen -l -f
对其运行时,它们彼此匹配,但与ssh-keygen
在 Ubuntu 上本地运行的不匹配(例如,实现不同)。
2a. 这样做scp
只是我认为可以测试的一种方式。
问题的关键是:在我告诉它“是”我会接受之前,如何确认 ssh ui 显示的指纹是正确的?
指纹局部视图(大约):
"2048 SHA256:NPAULv10 **** lic4QQ user@example.com (RSA)"
远程查看指纹(使用Win PuTTy):
"The new rsa2 key …
我有一个 find + ls 向我展示了几个文件的 .sh 和 .sh.bak 。
我复制了其中一个,以为我会有 3 个文件,但是,
ls 停止显示其中一个,即 .sh.bak
我正在重复历史中的 find + ls 并且我已经比较了副本
查看2个文件:
[root@localhost jeos]# find / -name del-non-*-locales.sh* -execdir ls -lh {} \;
-rwxr-xr-x. 1 root root 4.4K Dec 17 2016 /root/proj/vm/locale/backups/del-non-eng-locales.sh.bak
-rwxr-xr-x. 1 root root 4.4K Dec 17 2016 /root/proj/host.setup/manual/del-non-english-locales.sh
Run Code Online (Sandbox Code Playgroud)
复制 1
[root@localhost jeos]# cp ~/proj/host.setup/manual/del-non-english-locales.sh .
Run Code Online (Sandbox Code Playgroud)
向上箭头 + 输入...以为我现在会看到 3 个文件
[root@localhost jeos]# find / -name del-non-*-locales.sh* -execdir ls -lh {} \;
-rwxr-xr-x. 1 root root 4.4K Dec 17 …
Run Code Online (Sandbox Code Playgroud)