Ubuntu 14.04 启动已安装的第三方应用程序时,它会显示一个带有通知消息的弹出窗口。我想找到一个包含显示此弹出窗口的代码的应用程序文件。是否有工具可以帮助确定此文件?至少,如何通过扫描“/”根目录中的特定文本字符串来找到此弹出窗口中包含的文件?
答案1
要在已编译的二进制应用程序中查找字符串,可以使用strings
命令 -fromman strings
NAME
strings - print the strings of printable characters in files.
DESCRIPTION
For each file given, GNU strings prints the printable character
sequences that are at least 4 characters long (or the number given with
the options below) and are followed by an unprintable character.
例如,
$ strings -d /usr/bin/gnome-calculator | grep 'Mode$'
ButtonMode
Basic Mode
Advanced Mode
Financial Mode
Programming Mode
Keyboard Mode
或者
$ strings -df /usr/bin/gnome-* | grep 'Restart$'
/usr/bin/gnome-software: Restart