30

是日笔记(10/18/2018)

 5 years ago
source link: http://ericcenblog.com/2018/10/18/shi-ri-bi-ji-10-18-2018/?amp%3Butm_medium=referral
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

1.把Jetty最新的release version的代码check out下来,想build一下,发现里面一堆内部module的依赖的version是project.version,导致build不了,一个个改或者用ide全局替换都不爽,Nancy花了大概0.001秒的时间,写了一个命令,执行,清清爽爽:

find ./ -name pom.xml | xargs sed -i 's|${project.version}|9.4.12.v20180830|g'

就这个命令,先find出所有pom文件,然后用sed全局替换,简直能跻身运维必会命令前三甲:)

2.现在做的项目里,维护了一堆脚本,打包成RPM装到系统里,有时候想知道某个命令究竟是那个RPM装上去,stackoverflow了两条命令,利索:

rpm -qf command_full_path or yum whatprovides command_full_path 。 其中 yum whatprovides 这个,真是自带萌点。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK