“Shell 命令”的版本间的差异

来自wrc's Wiki
跳到导航 跳到搜索
 
第1行: 第1行:
 
[[Category:命令行]]
 
[[Category:命令行]]
 
== 例子 ==
 
== 例子 ==
 
=== 使用 <code>git diff</code> 的格式比较不在仓库中的文件 ===
 
 
<ref>https://stackoverflow.com/a/17433969/10974106</ref>
 
 
git diff --no-index -- A B
 
 
还可加 <code>git diff</code> 的其他选项(如指定 context 行数等等)
 
  
 
=== ulimit ===
 
=== ulimit ===

2021年9月10日 (五) 09:21的最新版本

例子

ulimit

查看各种信息

ulimit -a

更改 stack size

ulimit -s 64000

同时运行几个命令

使用 xargs。

ls dir | xargs -P4 -L1 cargo run --release

实时查看正在运行哪些命令:

watch -n 1 'pgrep -x cargo | xargs -L1 cmdof'

cmdof 见我的 scripts 仓库。

另见

参考资料