小编Thu*_*fir的帖子

以 100% 的利用率 snap /dev/loop -- 没有可用空间

可用空间:

thufir@dur:~$ 
thufir@dur:~$ df -h
Filesystem                   Size  Used Avail Use% Mounted on
udev                         3.9G     0  3.9G   0% /dev
tmpfs                        794M  9.8M  785M   2% /run
/dev/mapper/ubuntu--vg-root  220G   37G  173G  18% /
tmpfs                        3.9G   35M  3.9G   1% /dev/shm
tmpfs                        5.0M  4.0K  5.0M   1% /run/lock
tmpfs                        3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/loop0                    42M   42M     0 100% /snap/docker/171
/dev/loop1                    84M   84M     0 100% /snap/core/3440
/dev/loop3                    17M   17M     0 100% /snap/ubuntu-make/116
/dev/loop4                   232M  232M     0 100% /snap/vuze-vs/2
/dev/loop6                    17M   17M     0 100% /snap/ubuntu-make/109
/dev/loop7                    84M …
Run Code Online (Sandbox Code Playgroud)

storage lvm disk-usage hard-disk snap

25
推荐指数
1
解决办法
3万
查看次数

弹性 IP 地址与静态 IP 地址有何不同?

更多 Amazon Web Services EC2 问题,希望不会太离题。我有一个普通的 Ubuntu 实例,并关闭了它。重新启动时无法通过 ssh 连接到 FQDN,因为外部 IP 地址已更改。

“静态”甚至静态 IP 地址是否需要额外付费?我会选择半永久。Elastic 听起来是对的,用市场营销的话说。

或者,这是一种安全措施吗?我确实选择了一个外部 IP 地址,但它一个免费帐户。该文件说:

弹性 IP 地址是专为动态云计算设计的静态 IPv4 地址。弹性 IP 地址与您的 AWS 账户相关联。使用弹性 IP 地址,您可以通过快速将地址重新映射到您账户中的另一个实例来掩盖实例或软件的故障。

弹性 IP 地址是公共 IPv4 地址,可从 Internet 访问。

外部IP地址,我使用SSH的一个,从我所看到的运行时,不同ifconfig所以他们正在使用某种形式的NAT..as解释在这里

重要的

启动后,您无法手动取消公有 IP 地址与实例的关联。相反,它在某些情况下会自动释放,之后您将无法重复使用它。

即使我选择了一个外部 IP 地址,重启似乎 (?) 是将 IP 地址释放回池的情况。请澄清这种理解。

ip hostname hosts amazon-ec2 aws

11
推荐指数
1
解决办法
2821
查看次数

如何按摩或格式化 html 以便用 xmstarlet 解析?

我是否首先需要html通过类似的东西在野外奔跑jsoup?不让它在人类意义上有效,可能会变成胡言乱语,但至少xmlstarlet可以处理文件?

最好寻找一个可以像这样安装和使用的 CLI:

massage foo.html > bar.xhtml

或者至少是这些方面的东西。

用例:

thufir@doge:~/.html$ 
thufir@doge:~/.html$ curl http://int.soccerway.com/  > soccer.html
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  188k    0  188k    0     0   313k      0 --:--:-- --:--:-- --:--:--  313k
thufir@doge:~/.html$ 
thufir@doge:~/.html$ xmlstarlet sel -t -v "/html/body/table/tr/td[1]" -n soccer.html 
soccer.html:70.13: xmlParseEntityRef: no name
if (this.$ && this.$.fn && this.$.fn.jquery) {
            ^
soccer.html:70.14: xmlParseEntityRef: no name
if (this.$ && this.$.fn …
Run Code Online (Sandbox Code Playgroud)

command-line xml text-processing html xmlstarlet

8
推荐指数
1
解决办法
698
查看次数

如何以特定用户身份使用 ssh 登录?

在 Ubuntu AWS实例上,我想以ssh具有 sudo 权限的“thufir”身份加入。使用sudo adduser thufir然后adduser thufir sudo从“ubuntu”用户创建用户 thufir ?只需我的公钥添加~/.ssh/authorized_keys,然后我就可以 ssh 作为“thufir”到远程实例?

我可以使用我的常规公钥在 AWS 上以“ubuntu”身份登录,还是需要 AWS 生成的密钥?

我希望能够ssh使用我自己的密钥作为“ubuntu”——这可能吗?“ubuntu”用户没有密码,严格按密钥登录。

ssh key-authentication

8
推荐指数
2
解决办法
4万
查看次数

Resolve-DnsName:术语“Resolve-DnsName”未被识别为 cmdlet 的名称

为什么Resolve-DnsName不被认可PowerShell Core?据我记得它PowerShell本身工作得很好。

这是一个.NET对抗dotnet问题吗?根本dotnet就没有这个功能吗?

thufir@dur:~/powershell/webservicex$ 
thufir@dur:~/powershell/webservicex$ dotnet --version
2.1.4
thufir@dur:~/powershell/webservicex$ 
thufir@dur:~/powershell/webservicex$ ./dns.ps1 
Resolve-DnsName : The term 'Resolve-DnsName' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At /home/thufir/powershell/webservicex/dns.ps1:3 char:1
+ Resolve-DnsName -Name localhost -Type ANY | Format-Table -AutoSize
+ ~~~~~~~~~~~~~~~
+ CategoryInfo …
Run Code Online (Sandbox Code Playgroud)

scripting mono .net shell-script powershell

7
推荐指数
1
解决办法
5858
查看次数

从 CLI 创建虚拟机?(KVM)

如何从 CLI创建虚拟机?

创建虚拟机

First, download an ISO cd image of some OS you want to run. For Ubuntu, you can find these at:

    http://www.ubuntu.com/getubuntu/download 

Double click on the name of the host. The Status column should read Active

Right click on the name of the host, and select New
This will start a wizard to guide you through the rest of your VM creation
    Enter your virtual machine details

        Name: foo

        Choose Local install media (ISO image or …
Run Code Online (Sandbox Code Playgroud)

command-line kvm virtual-machine webserver system-installation

4
推荐指数
1
解决办法
2万
查看次数

1
推荐指数
1
解决办法
1万
查看次数