Limiting Command Size
Next: Controlling Parallelism, Previous: Unusual Characters in File Names, Up: Multiple Files [Contents][Index]
3.3.2.4 Limiting Command Size
xargs gives you control over how many arguments it passes to the command each time it executes it. By default, it uses up to ARG_MAX - 2k, or 128k, whichever is smaller, characters per command. It uses as many lines and arguments as fit within that limit. The following options modify those values.
--no-run-if-empty
-r
If the standard input does not contain any nonblanks, do not run the command. By default, the command is run once even if there is no input. This option is a GNU extension.
https://www.gnu.org/software/findutils/manual/html_node/find_html/Limiting-Command-Size.html#:~:text=xargs gives you control over,as fit within that limit.
--max-lines[=max-lines]
-L max-lines
-l[max-lines]
Use at most max-lines nonblank input lines per command line; max-lines defaults to 1 if omitted; omitting the argument is not allowed in the case of the ‘-L’ option. Trailing blanks cause an input line to be logically continued on the next input line, for the purpose of counting the lines. Implies ‘-x’. The preferred name for this option is ‘-L’ as this is specified by POSIX.
--max-args=max-args
-n max-args
Use at most max-args arguments per command line. Fewer than max-args arguments will be used if the size (see the ‘-s’ option) is exceeded, unless the ‘-x’ option is given, in which case xargs will exit.
--max-chars=max-chars
-s max-chars
Use at most max-chars characters per command line, including the command initial arguments and the terminating nulls at the ends of the argument strings. If you specify a value for this option which is too large or small, a warning message is printed and the appropriate upper or lower limit is used instead. You can use ‘--show-limits’ option to understand the command-line limits applying to xargs and how this is affected by any other options. The POSIX limits shown when you do this have already been adjusted to take into account the size of your environment variables.
The largest allowed value is system-dependent, and is calculated as the argument length limit for exec, less the size of your environment, less 2048 bytes of headroom. If this value is more than 128KiB, 128Kib is used as the default value; otherwise, the default value is the maximum.
Next: Controlling Parallelism, Previous: Unusual Characters in File Names, Up: Multiple Files [Contents][Index]
Limiting Command Size的更多相关文章
- [Mongo] error inserting documents: BSONObj size is invalid (mongoimport mongorestore 数据备份恢复)
解决办法如下, ./mongoimport -port 6066 -d xxx -c xxx --batchSize=10 /root/mong_data/test/xxx 原因转自 http://b ...
- Fedora 24中的日志管理
Introduction Log files are files that contain messages about the system, including the kernel, servi ...
- Java性能提示(全)
http://www.onjava.com/pub/a/onjava/2001/05/30/optimization.htmlComparing the performance of LinkedLi ...
- AVR Programming Methods
AVR Programming Methods There are many ways to program AVR microcontrollers. Since many people ask ...
- FLASH BACK
overview of different flashback technologies flashback query(including flashback query, flashback ve ...
- 关于WPF你应该知道的2000件事
原文 关于WPF你应该知道的2000件事 以下列出了迄今为止为WPF博客所知的2,000件事所创建的所有帖子. 帖子总数= 1,201 动画 #7 - 基于属性的动画 #686 - 使用动画制作图像脉 ...
- curl 使用手册
curl.1 the man page Related: Manual FAQ HTTP Scripting NAME curl - transfer a URL SYNOPSIS curl [opt ...
- curl英文直译
文档概述 比较表 curl手册页 常见问题 HTTP脚本编写 mk-ca-bundle 教程 curl / 文件 / 工具文档 /手册页 curl.1手册页 相关: 手动 常见问题解答 HTTP脚本 ...
- Linux下用ftp更新web内容!
使用ftp更新web!让网页更新一次OK! 配置如下: 1.在Linux下安装ftp服务器! yum -y install vsftpd #ftp由vsftpd提供! 2.配置主配置文件/etc/vs ...
随机推荐
- 阿里巴巴Java开发手册摘要(二)
MySql数据库 一建表规约 1.表达是与否概念的字段,必须使用is_xxx的命名方式,数据类型是unsigned tinyint(1:是,0否) 正例:表达逻辑删除的字段名is_deleted,1表 ...
- mysql索引最左匹配的理解(转载于知乎回答)
作者:沈杰链接:https://www.zhihu.com/question/36996520/answer/93256153来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明出 ...
- 转:builder模式分析
建造者模式 11.1 变化是永恒的 又是一个周三,快要下班了,老大突然拉住我,喜滋滋地告诉我:"牛叉公司很满意我们做的模型,又签订了一个合同,把奔驰.宝马的车辆模型都交给我们公司制 作了,不 ...
- 利用 trap 在 docker 容器优雅关闭前执行环境清理
当一个运行中的容器被终止时,如何能够执行一些预定义的操作,比如在容器彻底退出之前清理环境.这是一种类似于 pre stop 的钩子体验.但 docker 本身无法提供这种能力,本文结合 Linux 内 ...
- [BUUCTF]PWN——hitcontraining_magicheap
hitcontraining_magicheap 附件 步骤: 例行检查,64位程序,开启了nx和canary 本地试运行一下,经典的堆的菜单 64位ida载入,检索程序里的字符串的时候发现了后门 m ...
- [BUUCTF]REVERSE——[ACTF新生赛2020]rome
[ACTF新生赛2020]rome 附件 步骤 无壳,32位程序 32位ida载入,根据提示字符串"You are correct!",找到关键函数func v15 = 'Q'; ...
- 这样学习ZooKeeper离大厂所需技能要求还远吗
概述 定义 Apache ZooKeeper是一种用于构建分布式应用的高性能.高度可靠.开源的分布式协调服务,提供如配置信息维护.命名.分布式同步.组服务等功能,可以实现如分布式共识.组管理.领导选举 ...
- java 理论基础 类的初始化(加载、连接(验证、准备、解析)、初始化)
一个进程就有一个JVM,每个进程之间资源独立 当调用java命令来启动某个Java程序的时候,该命令创建一个独立的进程来运行我们的Java程序.而这个独立的进程里面就包含一个Java虚拟机.不管该程序 ...
- mongodb 连接方式之mongo-shell
单机连接:mongo 120.131.0.64:27017 -u root -p KingSoft@1314 --authenticationDatabase admin 字符串连接 python i ...
- float浮动的详细总结
float浮动的详细总结 1.定位方案 在css中,有4种常用的方法对元素进行定位和布局: normal flow:标准流.文档流: position:定位(relative.absolute.fix ...