我刚刚安装了一个新的 Ubuntu Server 18.04。我设置了我的主机名hostnamectl set-hostname ****.openbayou.biz并设置了/etc/hosts:
127.0.0.1 localhost
[ip address] ****.openbayou.biz hostname
# The following lines are desirable for IPv6 capable hosts
[ip6 address] *****.openbayou.biz hostname
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
Run Code Online (Sandbox Code Playgroud)
我还安装了 OSSEC 来监控服务器的新文件、错误和更改,现在我收到了这些警报:
Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-
0001, retrying transaction with reduced feature level UDP.`
Run Code Online (Sandbox Code Playgroud)
它现在重演:
systemd-resolved[3195]: message repeated 4 times: [ Server returned error
NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction
with reduced feature level …Run Code Online (Sandbox Code Playgroud) bash -以下 bash shell 代码是什么意思?好像是用来把输出最后一个代码作为输入。如果是这样,我可以把它写成bashorxargs bash吗?
curl --silent --location https://rpm.nodesource.com/setup | bash -
Run Code Online (Sandbox Code Playgroud) 例如我有 file 1.txt,其中包含:
Moscow
Astana
Tokyo
Ottawa
Run Code Online (Sandbox Code Playgroud)
我想将所有字符的数量计算为:
a - 4,
b - 0,
c - 1,
...
z - 0
Run Code Online (Sandbox Code Playgroud) 我经常在 Ubuntu 和 Windows 之间切换,因此我有一些文本文件的编码问题。
如果我在 Ubuntu 中保存文本文件,则在两个系统中一切正常。但是 Ubuntu 没有发现用 Windows 保存的文件的编码。每次我在 Ubuntu 文本编辑器中打开“windows 文件”时,我都必须更改编码选项。
解决方案是将编码从 Windows-1250 更改为 utf-8。
所以问题是如何用 Windows-1250 打开每个文件并用 utf-8 保存它,对于当前目录子目录中的每个文件(递归我的意思)。我可以在终端中完成还是需要一些外部应用程序。
我期待着你的帮助。
我正在尝试按照此链接中的说明在我的 Ubuntu 18.04.1 中安装 ImageMagick 。
运行以下命令后
./configure
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
configure: error: in `/home/bharath/src/ImageMagick-7.0.8-66':
configure: error: libltdl is required for modules and OpenCL builds
See `config.log' for more details
Run Code Online (Sandbox Code Playgroud)
谁能告诉如何解决这些错误?
我必须用第一个词替换每一行的最后一个词。代码是:
$ sed "s/\(^a-z,0-9]*\)\(.*\)\([a-z,0-9]*$\)/\1\2\1\g".
Run Code Online (Sandbox Code Playgroud)
这部分我\(^a-z,0-9]*\)\(.*\)\([a-z,0-9]*$\)特别不明白\(.*\)。
以 root 身份登录后,我输入apt-get update,它给了我:
E: Malformed entry 51 in list file /etc/apt/sources.list (URI parse)
E: Malformed entry 1 in list file /etc/apt/sources.list.d/docker.list (Component)
E: The list of sources could not be read.
Run Code Online (Sandbox Code Playgroud)
它出什么问题了?
看到很多相关的答案我输入了代码: sudo -H gedit /etc/apt/sources.list
然后它显示:
# deb cdrom:[Ubuntu 16.10 _Yakkety Yak_ - Release amd64 (20161012.2)]/ yakkety main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ yakkety main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ yakkety main restricted
## …Run Code Online (Sandbox Code Playgroud) 我有 100 个文件夹,每个文件夹都有一个名为“ABC”的子文件夹。我想将“ABC”的文件夹结构和内容复制到另一个位置。
我怎样才能通过 Ubuntu 终端做到这一点?
每次我做任何与sudo(主要是安装存储库)相关的事情时,它都会说找不到命令。
我输入:
sudo add apt-repository ppa:ppsspp/stable
Run Code Online (Sandbox Code Playgroud)
然后它说
sudo:add-apt: command not found
Run Code Online (Sandbox Code Playgroud)
有时它告诉我手动运行configure --a,我这样做了,但它仍然不起作用。有谁知道怎么修???
我在 Ubuntu 18.04 LTS
command-line ×6
bash ×4
18.04 ×2
apt ×1
archive ×1
compiling ×1
dns ×1
encoding ×1
imagemagick ×1
job-control ×1
repository ×1
scripts ×1
sed ×1
server ×1
sudo ×1
updates ×1
windows ×1