AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-332494

snoop's questions

Martin Hope
snoop
Asked: 2016-03-24 02:02:14 +0800 CST

为什么有 2 个目录具有相同的内容?

  • 6
  1. cd /proc/$$/root/bin
  2. cd /bin

在两个目录上运行ls命令后,我发现两个目录的内容相同(只是命令列表)。

在两个目录中具有相同的命令列表是否有任何具体原因?

command-line
  • 2 个回答
  • 2947 Views
Martin Hope
snoop
Asked: 2015-10-17 05:52:40 +0800 CST

如何用双精度值替换 XML 文件中的数字?

  • 1

输入文件“input.xml”:

<integer name="leftValue">30</integer>
<integer name="rightValue">580</integer>
<integer name="rightValueDefault">495</integer>

我希望每个数值乘以 2:

<integer name="leftValue">60</integer>
<integer name="rightValue">1160</integer>
<integer name="rightValueDefault">990</integer>

怎么做?

text-processing
  • 2 个回答
  • 1114 Views
Martin Hope
snoop
Asked: 2015-10-16 02:55:11 +0800 CST

获取使用的前 10 个命令的历史记录[重复]

  • 3
这个问题在这里已经有了答案:
如何在终端中列出最常用的命令? (3 个答案)
6 年前关闭。

有没有办法找出历史上最常用的 10 个命令?这里的前 10 名是指我使用最多的命令,即使用次数多于其他命令的命令。

bash
  • 2 个回答
  • 1897 Views
Martin Hope
snoop
Asked: 2015-10-14 00:57:56 +0800 CST

像 SSH 一样,我们有任何其他用于 Ubuntu 的远程连接软件吗?

  • 0

我见过openssh主要用于连接目的。我们是否有适用于 Ubuntu 的类似/更高级的连接软件?

connection
  • 2 个回答
  • 58 Views
Martin Hope
snoop
Asked: 2015-10-04 08:24:17 +0800 CST

是否可以使用 Chrome 的命令行创建新的用户配置文件?

  • 5

出于自动化目的,是否可以使用终端为 Google Chrome 创建新的用户配置文件?

另外,在创建新的用户配置文件后,我们可以使用创建的用户配置文件启动 chrome 吗?

google-chrome
  • 1 个回答
  • 10777 Views
Martin Hope
snoop
Asked: 2015-10-01 05:53:36 +0800 CST

DirectX 与 OpenGL

  • 2

我们可以DirectX使用 wine 和OpenGLnatively 来运行。所以问题是:

  • OpenGL等同于(例如 11、12 等)的确切版本是什么DirectX,我们可以这样比较吗?
graphics
  • 2 个回答
  • 3659 Views
Martin Hope
snoop
Asked: 2015-09-29 07:02:43 +0800 CST

如何找到全局可写文件和文件夹并设置粘滞位?

  • 18

我想做以下事情:

  1. 需要从/根目录中找到所有世界上可写的文件和文件夹。
  2. 如果找到,我需要检查是否设置了粘滞位。
  3. 如果未设置粘滞位,则设置它。

我们可以针对此类问题提出命令行解决方案吗?

command-line
  • 3 个回答
  • 60528 Views
Martin Hope
snoop
Asked: 2015-09-25 07:26:06 +0800 CST

W:GPG 错误和警告:无法验证以下包!

  • 0

我得到以下命令sudo apt-get update的输出sudo apt-get upgrade。

user@user-VPCCB45FN:~$ sudo apt-get update
......
......
Ign http://in.archive.ubuntu.com trusty-backports/main Translation-en_US
Ign http://in.archive.ubuntu.com trusty-backports/multiverse Translation-en_US 
Ign http://in.archive.ubuntu.com trusty-backports/restricted Translation-en_US 
Ign http://in.archive.ubuntu.com trusty-backports/universe Translation-en_US   
Fetched 3,581 kB in 59s (59.9 kB/s)                                            
Reading package lists... Done
W: GPG error: http://download.virtualbox.org trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 54422A4B98AB5139
W: GPG error: http://dl.google.com stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A040830F7FAC5991
W: GPG error: http://dl.google.com stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A040830F7FAC5991
W: GPG error: http://extras.ubuntu.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 16126D3A3E5C1192
W: GPG error: http://archive.canonical.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: http://in.archive.ubuntu.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: https://download.01.org trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A902DDA375E52366
W: GPG error: http://security.ubuntu.com trusty-security Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: http://in.archive.ubuntu.com trusty-updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: http://in.archive.ubuntu.com trusty-backports Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: http://ppa.launchpad.net trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY CC079478E5B13347
user@user-VPCCB45FN:~$ sudo apt-get upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  hostapd
The following packages will be upgraded:
  apport apport-gtk python3-apport python3-problem-report
4 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Need to get 275 kB of archives.
After this operation, 5,120 B of additional disk space will be used.
Do you want to continue? [Y/n] y
WARNING: The following packages cannot be authenticated!
  python3-problem-report python3-apport apport apport-gtk
Install these packages without verification? [y/N] 

我尝试遵循现有的解决方案,但没有运气:

  1. GPG 错误 NO_PUBKEY:警告:无法验证以下包![关闭]
  2. 如何修复 GPG 错误“NO_PUBKEY”?

我怎么解决这个问题?

apt
  • 1 个回答
  • 2695 Views
Martin Hope
snoop
Asked: 2015-08-08 00:59:32 +0800 CST

如何配置 iptables 文件以仅允许所有端口上的特定 ipaddress 并拒绝所有其他 ipaddress?

  • 3

我需要一个 iptables 文件的配置,它只允许我通过特定的 ip 地址连接,比如在 0-5555 范围内的所有端口上的 10.0.0.1 并拒绝所有其他 ip 地址?

我尝试了不同的 iptables 命令选项,但它没有正常工作。确切的 iptables 命令是什么?

编辑:Ubuntu 14.04 LTS

networking
  • 1 个回答
  • 7392 Views
Martin Hope
snoop
Asked: 2015-08-07 18:34:18 +0800 CST

在 Ubuntu 14.04 LTS 上安装内核 4.1.3 lts(最新版本)是否安全?

  • 0

众所周知,内核版本 4.1.3 LTS 已发布,但 Ubuntu 14.04 LTS 仍在使用内核 3.13。

在 Ubuntu 14.04 LTS 上安装最新的内核版本有什么好处。另外,我没有任何将 Ubuntu 14.04 LTS 升级到更高版本的计划。截至目前,我只想继续使用 14.04 LTS。

14.04
  • 1 个回答
  • 526 Views
Martin Hope
snoop
Asked: 2014-12-30 21:43:39 +0800 CST

Gedit-3.14.2 可用于 ubuntu 吗?

  • 2

我将从哪里获得 gedit 最新版本?目前我的 Ubuntu 版本 14.10 上安装了 3.10.4。我们有任何 ppa 可用于下载最新的 gedit 吗?

ppa
  • 3 个回答
  • 4355 Views
Martin Hope
snoop
Asked: 2014-12-30 05:20:13 +0800 CST

Geany 的钴主题?

  • 0

是否有像 Gedit 钴主题一样可用于 Geany Editor 的钴主题?还有如何安装这些主题。有什么办法可以为这些类型的编辑器创建我们自己的主题吗?

gedit
  • 1 个回答
  • 811 Views
Martin Hope
snoop
Asked: 2014-12-28 05:30:00 +0800 CST

如何按用户名将 /etc/passwd 和 /etc/shadow 文件内容分组到新文件中?

  • 2

假设我在 /etc/shadow 文件中有这样的内容:

root:!!:16087::::::
ftp:!!:14796::::::

在 /etc/passwd 文件中这样:

ftp:x:40:49:FTP account:/srv/ftp:/sbin/nologin
root:x:0:0:root:/root:/bin/bash

我想将它们分组为:

ftp:!!:14796::::::x:40:49:FTP account:/srv/ftp:/sbin/nologin
root:!!:16087:::::::x:0:0:root:/root:/bin/bash

我在上面做了什么:

我首先从两个文件中找到命令用户名,然后将它们连接成一行。此外,我正在从第二行删除用户名(因为这已经存在于开始时所以不需要 2 次)。

简单的命令是什么?

command-line
  • 2 个回答
  • 4229 Views
Martin Hope
snoop
Asked: 2014-12-27 07:26:49 +0800 CST

如何在 Ubuntu 14.10 上将 gnome 3.14 降级到 3.12

  • 1

将 gnome 从 3.12 升级到 3.14 后,一些图标看起来更大且统一。Chrome 图标、系统设置对话框未正确显示。怎么解决?我需要应用任何补丁吗?

unity
  • 1 个回答
  • 2981 Views
Martin Hope
snoop
Asked: 2014-12-25 02:16:12 +0800 CST

cat vs grep vs awk 命令获取文件内容哪个效率更高且耗时更少?

  • 1

可以说我有这样的文件内容:

this is a simple file for testing purpose
with few lines in it.
to check the cat and grep command to verfy which is best and less excution time consuming

首先我试过:

time cat temp.txt

输出:

this is a simple file for testing purpose
with few lines in it.
to check the cat and grep command to verfy which is best and less excution time consuming

real    0m0.001s
user    0m0.000s
sys     0m0.001s

其次我试过:

time grep "$"  temp.txt

输出:

this is a simple file for testing purpose
with few lines in it.
to check the cat and grep command to verfy which is best and less excution time consuming

real    0m0.002s
user    0m0.000s
sys     0m0.002s

第三我试过:

time awk  "/$/"  temp.txt

输出:

this is a simple file for testing purpose
with few lines in it.
to check the cat and grep command to verfy which is best and less excution time consuming

real    0m0.004s
user    0m0.001s
sys     0m0.004s

和:

time awk 1 temp.txt

输出:

this is a simple file for testing purpose
with few lines in it.
to check the cat and grep command to verfy which is best and less excution time consuming

real    0m0.004s
user    0m0.000s
sys     0m0.003s

使用 sed:

time sed "" temp.txt

输出:

this is a simple file for testing purpose
with few lines in it.
to check the cat and grep command to verfy which is best and less excution time consuming

real    0m0.002s
user    0m0.000s
sys     0m0.002s

这意味着 cat 是打印所有文件内容的更好命令。因为它执行所需的时间更少。?

grep
  • 2 个回答
  • 6141 Views
Martin Hope
snoop
Asked: 2014-12-24 06:12:14 +0800 CST

如何使用 sed 查找 2 个模式之间的字符串?

  • 0

我有这样的文件内容:

aaa accounting exec ...
aaa accounting exec ...
aaa accounting commands ..
aaa accounting commands ..
aaa accounting commands ..
aaa accounting commands ..
aaa accounting commands ..
aaa accounting commands ..
aaa accounting network ..
aaa accounting connection ..
aaa accounting system ..
!
aaa accounting exec default
 action-type start-only
 group tacacs+
!
aaa accounting exec default stop-only group tacacs+

输出应该是这样的:

aaa accounting exec default ..
aaa accounting exec default
 action-type start-only
 group tacacs+
!
aaa accounting exec default ..

我试过以下sed命令:

sed -n '/aaa accounting exec default/,/!/p' AboveFileContent.txt

但这不是我想要的。

解决方案是什么?我也尝试过使用awk但同样的结果即将到来。获得准确输出的命令是什么?

sed
  • 2 个回答
  • 1029 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve