0

I have a directory that was originally all ".doc" files and were copied over to an external hdd. Now all the files are 'binary' files. Some have extensions, many do not.

I tried opening them with the following commands after making them executable, and separately, without making them executable.

chmod +x filename.bin (or filename.chk) 

For example: chmod +x file.chk This resulted in $ on the next line.

./filename.bin (or ./filename.chk)

For example: ./file.chk This resulted in "cannot execute binary file" "exec format error".

I want to open these files just like you would open a word document so I can read the contents.

sgu55
  • 81
  • If the files were .doc before, that generally suggest that they were MS Word documents. If so, why are you trying to execute them? – Andy Dalton Jun 21 '19 at 03:37
  • For the commands above, the person who wrote that suggestion stated to first make sure they are executable. I tried it without and with 'executable' - same result. I have not seen the ext ".bin" on any of them, just ".chk" or no ext. Thanks. – sgu55 Jun 21 '19 at 03:38
  • Can you please update your question with the output of file filename (for some filename) – Andy Dalton Jun 21 '19 at 03:40
  • Website with the instructions: https://www.cyberciti.biz/faq/howto-unix-command-run-execute-bin-files-in-linux/ – sgu55 Jun 21 '19 at 03:48
  • 2
    X-Y. Unknown what you're asking. – 炸鱼薯条德里克 Jun 21 '19 at 03:56
  • i agree with @炸鱼薯条德里克 comment ... what does open mean? .... we have no idea what you are trying to do unless you explain it – jsotola Jun 21 '19 at 04:37
  • You said open in the title but try to execute in the body, but more serious problem is these word documents are possibly corrupted somehow while you are asking how to restore them in a completely problem-unrelated way. – 炸鱼薯条德里克 Jun 21 '19 at 04:53
  • Added to the question: I want to open these files just like you would open a word document. - so I can read the contents. – sgu55 Jun 21 '19 at 05:58
  • These files are from a cloud. The cloud provider stated they should be in binary form b/c they are encrypted. ANd I must use windows to decrypt them and see them. I don't have windows, but I'll have to use someone else's computer to try it out. I don't think any more comments are needed for now. Thanks! – sgu55 Jun 21 '19 at 07:46

1 Answers1

0

Simply, the reason the files are binary is because they are encrypted - so they are not corrupted. They must be opened using windows OS (not linux) and other non-binary files accompanying the binary ones.

sgu55
  • 81