背景: 之前安装过一回010editor. 现在: 需要找出来配置文件存放在哪里。 尝试: 在一个没有安装过010editor的ubuntu16.04上运行010editor是可以使用的。 所以怀疑安装过010editor的系统肯定还有对应的配置文件没有删除干净,但是这些配置文件在哪里存放呢?
使用strace 跟踪010editor的运行,尝试查看它会打开哪些配置文件。
zz@zz:010editor 10.0.2(Linux)$ strace -o log ./010editor打开log后尝试着搜索conf这样的关键字,最后在2292行发现了/home/zz/.config/SweetScape/010 Editor.ini
2283 nanosleep({0, 0}, NULL) = 0 2284 open("/home/zz/.local/share/SweetScape/010 Editor/010Editor100.cfg", O_RDONLY) = -1 ENOENT (No such file or directory) 2285 nanosleep({0, 0}, NULL) = 0 2286 open("/home/zz/.local/share/SweetScape/010 Editor/010Editor100.cfg", O_RDONLY) = -1 ENOENT (No such file or directory) 2287 nanosleep({0, 0}, NULL) = 0 2288 open("/home/zz/.local/share/SweetScape/010 Editor/010Editor100.cfg", O_RDONLY) = -1 ENOENT (No such file or directory) 2289 nanosleep({0, 0}, NULL) = 0 2290 open("/home/zz/.local/share/SweetScape/010 Editor/010Editor100.cfg", O_RDONLY) = -1 ENOENT (No such file or directory) 2291 nanosleep({0, 0}, NULL) = 0 2292 access("/home/zz/.config/SweetScape/010 Editor.ini", F_OK) = 0 2293 open("/home/zz/.config/SweetScape/010 Editor.ini", O_RDONLY|O_CLOEXEC) = 8 2294 fstat(8, {st_mode=S_IFREG|0664, st_size=306, ...}) = 0 2295 fstat(8, {st_mode=S_IFREG|0664, st_size=306, ...}) = 0打开/home/zz/.config/SweetScape/010 Editor.ini:
1 [General] 2 D75BD954-8B63-84BA-75B3-019654928EE7=2790676889 3 E68B43C9-B732-8573-76A8-01AB75B3683A=253642384 4 F175B8C0-783C-8BA0-7045-014CA847B302=2765013166 5 F73529D0-8362-B7A9-7B25-01538B3C632A=1689836525 6 FA1395FC-83C3-0732-7D11-0134937462A0=1690236428 7 LastDate= 8 Name=kalikai 9 Password=F519-25AC-AA4D-D887-1AD6 ~可以看到,Name和Password就是启动010Editor后提示的注册码,试试把下面的连个文件夹删除后还能不能运行010Editor;
/home/zz/.local/share/SweetScape/010 Editor/ /home/zz/.config/SweetScape