linux - 是否有任何软件可以让我在 Windows 中读取文本二进制文件?

标签 linux windows unix binary

我有一些包含书籍章节的二进制文件(这些文件没有扩展名)是否有任何软件可以让我访问其中的内容?换句话说,将二进制转换为英文?

我尝试了几种解决方案...

谢谢

最佳答案

对于非常“基本”的尝试,

首先,尝试:

file  the_file

查看它是否是已知格式。然后相应地重命名文件并使用适当的程序打开它。

如果失败,您可以使用非常低级别的方法:

string the_file  >   the_strings_of_the_file

创建一个新文件 (the_strings_of_the_file),其中包含来自 the_file 的“字符串”。

它可能被无意义的东西弄得乱七八糟,而且(几个?)句子可能以任何顺序排列......

您可以尝试使用一些过滤器来缩小可能好的范围:

string the_file | grep  some_regexp  > the_strings_of_the_file.filtered_in
string the_file | grep  -v some_regexp  > the_strings_of_the_file.filtered_out

并调整 some_regexp 直到“filtered_out”不包含任何有值(value)的东西...

(如果您向我们提供一些“字符串”的输出,包括有意义的和一些无意义的,我可以帮助处理正则表达式)

(并且如果您确切知道使用了哪种语言:ascii?重音字母?等)

另一种方法:删除“无用”字母:

tr -cd ' -~\n\t' the_file > the_file_without_weird_letters
# note that if your file contain accentuated letters, you'll need to change the range.
# The range above is good for "everything printable in regular ascii"

关于linux - 是否有任何软件可以让我在 Windows 中读取文本二进制文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19937301/

相关文章:

c - 似乎 pthread_create 正在覆盖以前的线程

linux - 为什么在将 ls 传输到 mkdir 时会出现奇怪的类似时间戳的包含?

windows - Windows CE下LoadLibraryW()获取HINSTANCE后如何获取PE文件的基地址?

linux - 如何使用 tasket 将 cpu 核心分配给带有参数的程序的多个实例

c - Linux | C 中的 Shell 实现 |输入重定向不显示

linux - 通过将整数传递给尾部来修复尾部的无效行数

客户端未知的 MySQL 8.0 请求的身份验证方法(caching_sha2_password)

windows - 编写 Windows NT 子系统

linux - 如何编写一个 shell 脚本来打开四个终端并在每个终端中执行一条命令?

linux - 不能在 awk 命令中使用 unix $variable