当我想搜索 html 标签的一部分时,我厌倦了不得不逃避的事情。
我怎样才能准确搜索我输入的内容而不必转义?
例如
ack-grep 'console.log(foo'
Run Code Online (Sandbox Code Playgroud)
我得到:
Unmatched ( in regex; marked by <-- HERE in m/console.log( <-- HERE par/
Run Code Online (Sandbox Code Playgroud) 根据涓流的手册页,http://linux.die.net/man/1/trickle我可以限制一个进程的下载速度,例如
trickle -u 10 -d 20 ncftp
启动 ncftp(1) 将其上传容量限制为 10 KB/s,下载容量为 20 KB/s。
我将如何限制google-chrome或firefox使用trickle?
编辑:对于那些问我为什么问这么明显的问题的人,我试过了
trickle -u 10 -d 20 firefox
我收到一个错误
trickle: Could not reach trickled, working independently: No such file or directory
Firefox 随即打开,但绝对不受速率限制...
所以我试图将访客端口 80 转发到我的主机端口 80,以便我可以在我的主机浏览器中查看在我的访客上运行的 apache。
如果我设置如下:(8080/80),我可以查看 localhost:8080 并看到访客 apache 服务器。

当我将主机设置为 80 并将来宾设置为 80 时,它不起作用。我如何让客人 80 直接与主人 80 联系?
假设在 NAT 模式下运行是强制性的。
说我有以下 bash 脚本,可以找到所有 error.logs 给他们一个标题,然后在它下面拖尾 5 行..
#!/bin/bash
for ERR in `find -name "error.log"`;
do
echo -e "---- LOG: $ERR ----";
tail -n 5 $ERR;
done;
Run Code Online (Sandbox Code Playgroud)
我想让它像这样输出:
---- LOG: foo/error.log ----
[error ....]
[error ....]
---- LOG: foo/error.log ----
[error ....]
[error ....]
---- LOG: foo/error.log ----
[error ....]
[error ....]
Run Code Online (Sandbox Code Playgroud)
其中tail“d部缩进字符的一些量(例如4或任何一个制表符是)
我将如何缩进该特定部分的输出?
如果我ps aux | grep su在切换用户几次后我目前有以下内容:
fmaster 24811 0.0 1.3 10652 7000 pts/3 S 23:11 0:00 -su
root 24932 0.0 0.2 5352 1464 pts/3 S 23:12 0:00 su - root
root 24941 0.0 0.8 7772 4256 pts/3 S 23:12 0:00 -su
fmaster 27148 0.0 0.2 5352 1436 pts/3 S 23:28 0:00 su - fmaster
fmaster 27155 0.0 1.3 10652 7044 pts/3 S 23:28 0:00 -su
root 27284 0.0 0.2 5352 1468 pts/3 S 23:29 0:00 su -
root 27293 …Run Code Online (Sandbox Code Playgroud)