cd /proc/$$/root/bin
cd /bin
在两个目录上运行ls
命令后,我发现两个目录的内容相同(只是命令列表)。
在两个目录中具有相同的命令列表是否有任何具体原因?
cd /proc/$$/root/bin
cd /bin
在两个目录上运行ls
命令后,我发现两个目录的内容相同(只是命令列表)。
在两个目录中具有相同的命令列表是否有任何具体原因?
输入文件“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>
怎么做?
有没有办法找出历史上最常用的 10 个命令?这里的前 10 名是指我使用最多的命令,即使用次数多于其他命令的命令。
我见过openssh
主要用于连接目的。我们是否有适用于 Ubuntu 的类似/更高级的连接软件?
出于自动化目的,是否可以使用终端为 Google Chrome 创建新的用户配置文件?
另外,在创建新的用户配置文件后,我们可以使用创建的用户配置文件启动 chrome 吗?
我们可以DirectX
使用 wine 和OpenGL
natively 来运行。所以问题是:
OpenGL
等同于(例如 11、12 等)的确切版本是什么DirectX
,我们可以这样比较吗?我想做以下事情:
/
根目录中找到所有世界上可写的文件和文件夹。我们可以针对此类问题提出命令行解决方案吗?
我得到以下命令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]
我尝试遵循现有的解决方案,但没有运气:
我怎么解决这个问题?
我需要一个 iptables 文件的配置,它只允许我通过特定的 ip 地址连接,比如在 0-5555 范围内的所有端口上的 10.0.0.1 并拒绝所有其他 ip 地址?
我尝试了不同的 iptables 命令选项,但它没有正常工作。确切的 iptables 命令是什么?
编辑:Ubuntu 14.04 LTS
众所周知,内核版本 4.1.3 LTS 已发布,但 Ubuntu 14.04 LTS 仍在使用内核 3.13。
在 Ubuntu 14.04 LTS 上安装最新的内核版本有什么好处。另外,我没有任何将 Ubuntu 14.04 LTS 升级到更高版本的计划。截至目前,我只想继续使用 14.04 LTS。
我将从哪里获得 gedit 最新版本?目前我的 Ubuntu 版本 14.10 上安装了 3.10.4。我们有任何 ppa 可用于下载最新的 gedit 吗?
是否有像 Gedit 钴主题一样可用于 Geany Editor 的钴主题?还有如何安装这些主题。有什么办法可以为这些类型的编辑器创建我们自己的主题吗?
假设我在 /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 次)。
简单的命令是什么?
将 gnome 从 3.12 升级到 3.14 后,一些图标看起来更大且统一。Chrome 图标、系统设置对话框未正确显示。怎么解决?我需要应用任何补丁吗?
可以说我有这样的文件内容:
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 是打印所有文件内容的更好命令。因为它执行所需的时间更少。?
我有这样的文件内容:
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
但同样的结果即将到来。获得准确输出的命令是什么?