grep和find,找目录下包含某些内容的文件路径:
grep -ril 190 *
10/_gd_2970.xml
10/_gd_9266.xml
-bash-3.2$ find ./* -type f |xargs -i grep -nH "190" {}| awk -F: '{print $1}'
./10/_gd_2970.xml
./10/_gd_9266.xml
当前时间增加5分钟显示:
-bash-3.2$ date
2013年 08月 02日 星期五 15:23:59 CST
-bash-3.2$ date -d "1970-01-01 UTC $(expr $(date +%s) + 300) seconds"
2013年 08月 02日 星期五 15:29:01 CST
2013年 08月 02日 星期五 15:23:59 CST
-bash-3.2$ date -d "1970-01-01 UTC $(expr $(date +%s) + 300) seconds"
2013年 08月 02日 星期五 15:29:01 CST
Linux下,工具选项都异常强大啊!
未来:jquery、erlang、golang、快手和易语言。要努力学习了!gogogo!