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的更多相关文章

  1. [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 ...

  2. Fedora 24中的日志管理

    Introduction Log files are files that contain messages about the system, including the kernel, servi ...

  3. Java性能提示(全)

    http://www.onjava.com/pub/a/onjava/2001/05/30/optimization.htmlComparing the performance of LinkedLi ...

  4. AVR Programming Methods

    AVR Programming Methods  There are many ways to program AVR microcontrollers. Since many people ask ...

  5. FLASH BACK

    overview of different flashback technologies flashback query(including flashback query, flashback ve ...

  6. 关于WPF你应该知道的2000件事

    原文 关于WPF你应该知道的2000件事 以下列出了迄今为止为WPF博客所知的2,000件事所创建的所有帖子. 帖子总数= 1,201 动画 #7 - 基于属性的动画 #686 - 使用动画制作图像脉 ...

  7. curl 使用手册

    curl.1 the man page Related: Manual FAQ HTTP Scripting NAME curl - transfer a URL SYNOPSIS curl [opt ...

  8. curl英文直译

    文档概述 比较表 curl手册页 常见问题 HTTP脚本编写 mk-ca-bundle 教程 curl / 文件 / 工具文档 /手册页 curl.1手册页 相关: 手动 常见问题解答 HTTP脚本 ...

  9. Linux下用ftp更新web内容!

    使用ftp更新web!让网页更新一次OK! 配置如下: 1.在Linux下安装ftp服务器! yum -y install vsftpd #ftp由vsftpd提供! 2.配置主配置文件/etc/vs ...

随机推荐

  1. [BUUCTF]PWN——ciscn_2019_n_3

    ciscn_2019_n_3 附件 步骤 例行检查,32位,开启了nx和canary保护 本地试运行一下,经典的堆题的菜单 3.32位ida载入 new(),申请了两个chunk,第一个chunk(1 ...

  2. epx中设置断掉调试

    以前总听师傅们说,做pwn题,多调试,多调试. 师傅都说用gdb,但是我刚接触linux程序调试的时候用的是pwndbg,后来就用顺手了.但是调试一些简单程序还好,直接用pwndbg打开.但是这年头简 ...

  3. 测试开发实战[提测平台]17-Flask&Vue文件上传实现

    微信搜索[大奇测试开],关注这个坚持分享测试开发干货的家伙. 先回顾下在此系列第8次分享给出的预期实现的产品原型和需求说明,如下图整体上和前两节实现很相似,只不过一般测试报告要写的内容可能比较多,就多 ...

  4. windows 2008 server 服务器远程桌面连接会话自动注销,在服务器上开掉的软件全部自动关闭的解决办法

    windows 2008 server 服务器远程桌面连接会话自动注销,在服务器上开掉的软件全部自动关闭的解决办法:

  5. 线程 TLS

    TLS为什么产生呢?是软件开发中的什么问题呢?    TLS 产生背景进程中的全局变量与函数内定义的静态(static)变量,是各个线程都可以访问的共享变量.在一个线程修改的内存内容,对所有线程都生效 ...

  6. PSpice基本仿真分析例程

    一.瞬态分析 二.直流分析 2.1.直流分析电路 2.2.直流分析配置 2.3.直流分析输出波形 受供电电源的限制,输出最大值为±15V. 三.交流分析 3.1.1.交流分析电路1 3.1.1.交流分 ...

  7. vue+el-element中根据文件名动态创建dialog的方法

    背景 在项目中使用对话框的通常做法是把对话框封装成组件,在使用的地方引入,然后添加到template,使用visible.sync控制对话框的显示/隐藏,监听confirm事件处理用户点击确定.如下: ...

  8. DirectByteBuffer实现原理分析

    1.创建DirectByteBuffer Direct ByteBuffer是通过JNI在Java虚拟机外的内存中分配了一块(所以即使在运行时通过-Xmx指定了Java虚拟机的最大堆内存,还是可能实例 ...

  9. 【LeetCode】811. Subdomain Visit Count 解题报告(Python)

    作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 字典统计次数 日期 题目地址:https://lee ...

  10. 利用shiro反序列化注入冰蝎内存马

    利用shiro反序列化注入冰蝎内存马 文章首发先知社区:https://xz.aliyun.com/t/10696 一.shiro反序列化注入内存马 1)tomcat filter内存马 先来看一个普 ...