FreeBSD: July 2008 Archives
xargs有个开关-P,意思是同时启动多少个子进程。借助xargs的这个特性可以加速grep文件的速度。例如,
grep -r "libm.so.2" *
可以改写为
find . -type f | xargs -n 1 -P 20 grep "libm.so.2"
这样就会有20个进程同时查找了。
Search
October 2008
Friends
Recent Posts
Tag Cloud
- acm
- algorithm
- apache
- bash
- basketball
- bitlbee
- blog
- book
- boot
- camera
- cnlexizer
- computer vision
- console
- daemon
- daemontools
- debian
- directx
- dll
- dotNet
- dynamic programming
- eating
- eduos
- embedded
- evc
- eye candy
- fastcgi
- firefox
- framebuffer
- freebsd
- fs
- git
- grep
- hardware
- ifconfig
- im
- inputrc
- json
- kernel
- life
- linux
- maintainance
- math
- moluser
- msmtp
- mutt
- network
- nfs
- nlp
- notebook
- patch
- performance
- perl
- php
- printf
- regex
- router
- rxvt-unicode
- scp
- screen
- sexy
- shell
- slackware
- smartphone
- ssh
- ssl
- svn
- sysrq
- toshiba
- tunnel
- urxvt
- vc
- vcs
- vfw
- wallpaper
- windows
- xargs
Categories
Powered by Movable Type
Recent Comments
FW on 【转】rxvt-unicode (urxvt) 字间距过宽的patch: pls contac
jianingy on 用正则表达式Look-Ahead做带逃逸的变量替换: 这个lc是啥意思?
cnhackTNT on 用正则表达式Look-Ahead做带逃逸的变量替换: 晕,被过滤掉了,再试
cnhackTNT on 用正则表达式Look-Ahead做带逃逸的变量替换: s/(? 这样可以
R.Q. on 个性化SSH登录: 酱紫哦,了了 ---