![](/img/trans.png)
[英]How to find which shared library exported which imported symbol in my binary?
[英]Compare binary to exported textfiles and find which binary files have changed or are next since last export
我有一个充满专有格式二进制文件的文件夹,必须使用笨拙的软件将其导出到文本文件,最后我得到一个充满文件对的文件夹,例如:
myfile1.bin
myfile1.bin.txt
myfile2.bin
myfile2.bin.txt
myfile3.bin
myfile3.bin.txt
我不断将新的bin文件推送到服务器,以便myfile3.bin
的文件大小可能已更改,并且现在有了新的myfile4.bin
。 因此,我需要定期检查txt
文件中的哪些bin
文件已更改(大小/时间戳)以及哪些bin
文件中没有txt
文件,并将它们写在经过更改的txt
文件中,我可以使用该软件加载该文件以转换新的文件。
我想我必须保留文件夹中当前文件的列表(包括时间戳和大小),然后将保存的信息在10分钟内与文件夹内容进行比较,以查看发生了什么变化。
任何想法和帮助将不胜感激!
请检查以下帮助是否有帮助:
#!/bin/bash
while [ 1 ]
do
ls -ltr /dir_to/Monitor > out.txt # you can try ls -1l as well, depending upon the requirement
sleep 600
ls -ltr /dir_to/Monitor > out1.txt
if diff out.txt out1.txt > diff.txt; then
echo "Not Changed"
else
echo "Changed" # diff is changed
cp diff.txt diff_$(date +%s).txt #Copy the diff to a different file.
fi
done
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.