Wednesday, May 8, 2024
8
rated 0 times [  8] [ 0]  / answers: 1 / hits: 5147  / 1 Year ago, fri, march 24, 2023, 7:03:58

Correct me if I'm wrong, but one of the directories in which commands are stored in Ubuntu is /usr/bin. I tried viewing one of the ELF 64-bit LSB executable files (synergy) with nano but all I see is a mix of random symbols/letters. Can I view these files? If so, how do I go about it?


More From » command-line

 Answers
4

The most files (if not all) from /usr/bin are binary executable files. Now, a binary file is a computer file that is not a text file; it may contain any type of data, encoded in binary form for computer storage and processing purposes (more about: Binary file).



So, if a binary file is not a text file, you can't use nano (or another text editor) to edit it (well, you can, but for sure you will not know what you are doing).



In Ubuntu (and Linux like operating systems in general) there are some applications called hexeditors, like GHex which can be used to view and edit files in two ways, hex or ascii:



enter image description here



Furthermore, you can transform vim in a hexeditor by typing :%!xxd inside of it (:%!xxd -r to go back to normal mode).


[#26636] Saturday, March 25, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ouschee

Total Points: 485
Total Questions: 88
Total Answers: 106

Location: Central African Republic
Member since Mon, Aug 10, 2020
4 Years ago
ouschee questions
;