最近用到的 linux 命令, 记录一下:
// 查找当前服务器 用到 "jdbc/comdatas" 的所有应用
find . -name "orion-web.xml" | xargs grep jdbc/comdatas
// 查找 更新日期为 Feb 14 的 所有文件, 并将文件的 "modify date" 更新为当前日期
find . -name "*.jpg" -mtime 24 | xargs touch //不知道为什么不行
// 列出所有 更新日期为 Feb 14 的文件名
ll | grep "Feb 14" | cut -d : -f 2 | cut -d " " -f 2 >>test.log
// 删除空行
sed -i '/^ *$/d' test.log
// shell script, deal with test.log by touch
#!/bin/bash
while read line;do
touch $line;
done<./test.log
转载于:https://blog.51cto.com/now51jq/805812