Kyoto Cabinet`kchashmgr get`命令的输出格式是什么?

时间:2014-06-25 00:30:36

标签: php bash shell kyotocabinet

Hello Stackoverflowians,你好。

我希望从Kyoto Tycoon文件柜中提取缓存密钥中的信息,特别是来自Kyoto Cabinet实用程序 kchashmgr 的输出(参见:http://fallabs.com/kyotocabinet/util.html#kchashmgr)< / p>

我正在尝试从二进制/十六进制输出中提取 kchashmgr get 的输出中的到期日期。

kchashmgr get /path/to/kyto/tycoon/casket.kch cache_key

上面的输出格式是什么,所以从命令行shell实用程序我可以这样做:

expirationTimestamp=$(kchashmgr get /path/to/kyto/tycoon/casket.kch cache_key | something)

最初我以为我可以 gunzip 它(安装需要ZLIB),但这显然不起作用。我也尝试使用 -px 开关来查看是否有帮助。

注意:我正在寻找一种shell解决方案,可能会比使用PHP脚本更快。

感谢您在这个问题上的时间。

P.S。

[yramirez@losthost ~ ]$ kcutilmgr conf -v  # version of Kyoto Cabinet
1.2.76

0 个答案:

没有答案