我不希望它对我的系统执行此操作,但我想知道是否可以删除.bash_history?
如果是,那你能不能再提一次,否则历史就再也没有了?
另外,该history命令是否使用该.bash_history文件?
我最近意识到fileDebian Bullseye 无法识别我正在处理的某些文件格式,告诉我它们只是 ZIP 文件:
user@host:~ $ file file.docx # Correct, not a regular ZIP file
file.docx: Microsoft Word 2007+
user@host:~ $ file file.key # Incorrect, also not a regular ZIP file
file.key: Zip archive data, at least v2.0 to extract
Run Code Online (Sandbox Code Playgroud)
但是,如果我查看带有 的文件pcmanfm,我会发现文件类型被正确识别:
"file.docx" (50.5kB) Word 2007 document
"file.key" (10.4MB) Apple Keynote 5 presentation
Run Code Online (Sandbox Code Playgroud)
是否可以告诉使用file与使用相同的魔术文件pcmanfm,或者以某种方式更新默认值/etc/magic以file了解流行的文档格式?
尝试letsencrypt在 Debian Jessie上安装时,我遇到了以下我不太明白的情况。我已经安装了python-acme:
dpkg -l | grep acme
ii python-acme 0.6.0-1~bpo8+1 all ACME protocol library for Python 2
Run Code Online (Sandbox Code Playgroud)
现在我正在尝试安装python-letsencrypt:
apt-get install python-letsencrypt
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following …Run Code Online (Sandbox Code Playgroud) 的手册页setlocale似乎说语言代码和字符编码名称足以设置适当的区域设置:
区域设置名称通常采用 language[_territory][.codeset][@modifier] 形式,其中 language 是 ISO 639 语言代码,region 是 ISO 3166 国家/地区代码,codeset 是字符集或编码标识符,例如 ISO- 8859-1 或 UTF-8。
然而,快速测试表明,只有区域设置名称的“修饰符”部分是可选的:
void tryLocale(const char * locid)
{
char * result = std::setlocale(LC_CTYPE, locid);
std::cout << locid << " = " << (result ? result : "fail") << std::endl;
}
int main()
{
tryLocale("de"); // de = fail
tryLocale("de_DE"); // de_DE = fail
tryLocale("de_DE.CP1252"); // de_DE.CP1252 = de_DE.CP1252
tryLocale("de.CP1252"); // de.CP1252 = fail
tryLocale(".CP1252"); // .CP1252 = fail
}
Run Code Online (Sandbox Code Playgroud)
我的问题是我只知道所需的编码名称(例如ISO-8859-1 …