例如:
$ node
-bash: /usr/local/bin/node: No such file or directory
$ foo
-bash: foo: command not found
Run Code Online (Sandbox Code Playgroud)
有什么不同?在这两种情况下,node
和foo
无效的命令,但它似乎像Unix那样只是找不到node
二进制?卸载程序时,例如node
,有没有办法清理它,以便我得到
$ node
-bash: node: command not found
Run Code Online (Sandbox Code Playgroud)
编辑:
type
命令的结果:
$ type node
node is hashed (/usr/local/bin/node)
$ type foo
-bash: type: foo: not found
Run Code Online (Sandbox Code Playgroud) 什么是PATH
在一个Mac OS?我已经用它来安装全局命令行工具,但我找到的唯一文档是这样做的教程,没有真正解释幕后发生的事情。我也没有在Wikipedia上找到相关页面。
那么和**的目的是PATH
什么,有什么区别?/etc/paths
~/.bash_profile
例如,在我的paths
文件中,我看到:
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
Run Code Online (Sandbox Code Playgroud)
但在我的~/.bash_profile
,我看到了这一点:
# Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH
Run Code Online (Sandbox Code Playgroud)
这只是对paths
文件的特定于用户的添加吗?里面有什么东西paths
,比如/usr/bin
?
我使用 GPG 创建并对称加密了一个文件:
touch test.txt && echo 'test' >> test.txt
gpg --output test.txt --symmetric test.txt
Run Code Online (Sandbox Code Playgroud)
但现在我不知道如何解密它,而且令人惊讶的是,我在网上找不到示例。这是我尝试过的:
touch test.txt && echo 'test' >> test.txt
gpg --output test.txt --symmetric test.txt
Run Code Online (Sandbox Code Playgroud)
$ gpg --decrypt test.txt
gpg: AES encrypted data
gpg: encrypted with 1 passphrase
Run Code Online (Sandbox Code Playgroud)
$ gpg --symmetric --decrypt test.txt
gpg: conflicting commands
Run Code Online (Sandbox Code Playgroud)
$ gpg --passphrase --decrypt test.txt
gpg: no valid OpenPGP data found.
gpg: decrypt_message failed: Unknown system error
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?
bash ×1
binary ×1
command-line ×1
directory ×1
executable ×1
files ×1
filesystems ×1
gpg ×1
osx ×1
path ×1
pgp ×1
security ×1