致力于Ubuntu中文推广http://forum.ubuntu.com.cn/
http://forum.ubuntu.com.cn/viewtopic.php?t=465535
代码: 全选
#loc(){ locate -eLin $(($LINES-4)) -r "^`pwd`.*$1[^\/]*$"; }
▶ cat bin/loc #!/bin/bash r=`echo $*|sed 's/\ /|/g'` locate -AbeLi $*|grep "^`pwd`"|grep --color=always -iE "$r"