Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [binary]

The tag has no usage guidance.

1
vote
2answers
37 views

View and delete part of data in binary file

How to delete part of binary data from binary file? (hex dump). I tried GHex 3.18.0 binary file editor, but it's not suitable for this, just lack even simple features. For example, I need select the ...
-2
votes
0answers
28 views

Is there a way to replace a file in /usr/local/bin without sudo access?

I'm creating an installation package that puts an bin file in /usr/local/bin (my choice, I could change that). The goal is to have the bin file in $PATH and executable by a standard user. Another ...
-1
votes
0answers
14 views

Recover image from bad drive (XD card) that does NOT have error detection

I've got an old XD card. XD cards don't have a controller. The card reader's controller directly accesses the flash chips. So there is no error detection, ie. the result is different sometimes but 99% ...
0
votes
0answers
41 views

In vim in binary mode what is a ^K character?

When I open a file with vim -b it displays ^K sometimes in the text, which cannot be removed by dos2unix. It prevents dos2unix from processing the file:dos2unix: Binary symbol 0x0B found at line 628 ...
-1
votes
1answer
20 views

Can I install binary only drivers in Gentoo Linux?

I am considering Gentoo Linux as a possible candidate for my system. The only doubt I have at this point is about binary tools. Being Gentoo a source based distribution to be built from scratch, can ...
-2
votes
1answer
88 views

Replace a binary file within another binary file

Is it possible replace in place a binary file located inside another binary file? For example, compressed firmware.bin file contains: DECIMAL HEXADECIMAL DESCRIPTION ------------------------...
5
votes
1answer
730 views

Why do I get “Binary file matches” with grep -I?

In the following example, grep behaves strangely: it's supplied with -I option, which, according to man page, should make grep ignore binary files (similarly to --binary-files=without-match), but I ...
0
votes
1answer
104 views

Shell - Read binary file character by character as hex

I'm trying to read serial input(/dev/tty*) character by character. I need this to parse the data following the corresponding protocol. My current method is as follows: while read -rs -n 1 c; do ...
0
votes
1answer
32 views

linux aplication binary files location - how to find out?

An application usually consists of 3 different file types : binary files configuration files application data Where does Linux (CentOS, RHEL) store the binary files for a given application / how ...
0
votes
3answers
26 views

How Change psql Versions?

My system is looking at usr/bin/psql and I need to use /usr/pgsql-10/bin/psql but I'm not sure how to change it. I don't feel like I should be deleting or renaming the first one. How can I get my ...
0
votes
0answers
14 views

How to debug a font binary from the Terminal on Mac

I have created a demo font which I haven't been able to get working yet, running into this Browser error when I try to load it in the browser: OTS parsing error: incorrect entrySelector for table ...
1
vote
1answer
36 views

Are CentOS 7 binaries the same of Ubuntu or any other GNU distribution?

I need to compile and run binaries on CentOS 7 but I'm having hard time running my wrapper app due to Python versions and other issues. If I compile and test binaries on Ubuntu (or any other ...
0
votes
1answer
45 views

Why would there be a binary incompatibility between packages for different Linux distributions? [duplicate]

The Linux Standard Base project is an effort to create a binary compatibility between different Linux distributions. But why would this be necessary? The implication is that the source code for the ...
0
votes
0answers
23 views

What software that I run uses AVX (or a specific assembly instruction)?

Let's say I want to find any libraries that use AVX, or the VZEROALL instruction? How could I go about doing that? I don't care if the AVX was hand written or compiled, I'll look that up later. I'm ...
3
votes
1answer
52 views

How do I boot a bootable .bin file from a CD/DVD?

I have written a bootable program in assembly and compiled it into an .bin file. I want to make it boot from a CD/DVD. How to do that?
1
vote
1answer
19 views

Insert OD output in another file

I have output from an od command (without access to the original file). Is it possible for me to get the binary data and insert it into another file with a programming language, like python? Here is ...
2
votes
1answer
313 views

Text file being identified as binary

Background I've been using lynx for a couple of years to dump automatically (via cron), process (using awk, sed, and tr), then mail (bsd-mailx) the contents of a web page. It's been working pretty ...
0
votes
2answers
418 views

Why the output of “cat a.out” is some weird text, instead of binary? [duplicate]

We all know "a.out" is file-format used to denote object code(binary) and is abbreviated form of assembler output, then cat a.out should also give us binary but why this doesn't happens? I am ...
1
vote
0answers
49 views

ARP binary for MIPS64 (big-endian) compatible with Linux v2.6

Where can I find an ARP binary for the MIPS64 (big-endian) CPU compatible with Linux v2.6 ? By "ARP binary" I mean a standalone compiled binary executable of the ARP command that manipulates the ...
3
votes
2answers
757 views

Is there a way to embed an executable binary in a shell script without extra tools?

I'm looking for a way to have an executable binary hardwired into a script. Something like this: #!/bin/bash ...some shell code execute binary: >>> binary code ......
1
vote
2answers
932 views

Use dd to extract a precise portion of a file?

I have a 588Ko file, and I want to extract bytes from 0x7E8D6 to 0x8AD5D. I tried : dd if=file of=result bs=50311 count=1 skip=518358 50311 stands for 0x8AD5D - 0x7E8D6 518358 stands for 0x7E8D6 (...
1
vote
2answers
55 views

CLI: Editing binary strings

There's a nice CLI binutils utility for interpreting binary files, and outputting legible strings, in a cat-like fashion. It's called strings. If you try to cat a binary file, you'll see a bunch of ...
0
votes
3answers
3k views

What's the right way to base64 encode a binary file on CentOS 7?

I'm using CentOS 7 with bash shell. I thought base64-encoding a binary file would be as simple as [rails@server lib]$ cat mybinary.file | base64 > /tmp/output.base64 However, I notice when I ...
1
vote
1answer
408 views

Replace a binary block within a large file

I have a partition image that contains a 1MB file populated with random data, and I would like to replace the contents of that file with another 1MB file populated with different random data. I have ...
1
vote
1answer
432 views

how to read a nul-terminated-string from a binary file

I have a binary file that is filled with FF values. I filled its start with many \000. Then, I padded its start with 10 \000, in order to get some kind of offset, and then I wrote a shorter string, ...
0
votes
1answer
73 views

how is it possible that which -a shows two paths?

When I execute which -a python I get two paths: /home/autumn/anaconda3/bin/python /usr/bin/python If I delete the directory ~/anaconda3 the first link to the python binary automatically vanishes....
0
votes
0answers
39 views

Automated way to periodically move files of a specific file-extension to cloud folder (mounted as local directory)

I am currently working on a large project (Phd thesis) using git for version control. My source files are processed by latex which are just plain-text, naturally suited to version control. The ...
2
votes
1answer
109 views

Why can't we delete an running executable file [closed]

As we know, when we execute an executable file, this file will be loaded into RAM. So I'm thinking that I can rm a.exe after ./a.exe. In my opinion, after executing ./a.exe, this file has been ...
0
votes
1answer
1k views

Symbol table in the .data section of ELF

I'm trying to understand how does symbol tables relate to the .data section in ELF. First some assumptions that I'm using as ground to start with. A symbol is a human readable (or "as written in ...
0
votes
1answer
7k views

Troubleshooting advice for: -bash: cannot execute binary file: Exec format error

I have a mining rig and am trying to run a program ./garlicoind but I get this error: -bash: ./garicoind: cannot execute binary file: Exec format error Is this a common problem? What does it ...
0
votes
1answer
96 views

Do executable binary files need w permission

I'm trying to make my linux system secure. So I'm considering if I can remove the w permission for all of binary files, such as ls, pwd etc. For now they are all -rwxr-xr-x root root, can I remove w ...
0
votes
1answer
52 views

Developing GUI for a linux executable [closed]

I am looking for guide/tips on developing a graphical user interface (GUI) for a Linux executable that I am interested on. How do I go about doing it? What applications/resources do I need?
11
votes
5answers
7k views

How to reverse the content of binary file?

I was solving a challenge where I found a data file with no file extension. The file command shows that it is a data file (application/octet-stream). The hd command shows GNP. in the last line. So if ...
-1
votes
1answer
50 views

How do I converting a stream of newline separated ascii numbers into binary (and back again)?

This is in the context of interacting with /dev/dsp and pacat. I would ideally like to be able to specify the encoding mechanism (big- versus little-endian, char/short/long). As a bonus, some sort ...
0
votes
0answers
1k views

“fastboot: usage :no command” error when running fastboot standalone

As we know, recently Google released binaries of ADB/Fastboot which now can be downloaded separately. Everywhere they write you can use them as is from the directory (i.e. "just works"), however I ...
0
votes
1answer
28 views

Prohibit access for certain programs to specific user groups

I am trying to do some security levels on my linux system. For example, deny access to ping command or disk utility application can be easly done by restricting permissions to 750 for binaries: /bin/...
3
votes
2answers
551 views

What is meant by “locally installed package” in the world of Unix?

I've been scratching my head over the File System Hierarchy Standard recently and in numerous occasion, when talking about the /usr/local directory, I came across the term "locally installed packages"....
1
vote
1answer
116 views

Can't forward a TCP socket in a bash script

I have four TCP sockets connected to a device. These are created with exec 3<>/dev/tcp/IP/PORT exec 4<>/dev/tcp/IP/PORT exec 5<>/dev/tcp/IP/PORT exec 6<>/dev/tcp/IP/PORT In ...
8
votes
1answer
8k views

What's the difference between a binary file and a library?

I'm trying to understand the Filesystem Hierarchy Standard. I have looked up both binaries and libraries, and as I currently understand it: binaries are files of computer-readable code in binary ...
7
votes
5answers
2k views

Creating a program in bin

I've compiled linked and created a program in C++ now I have foobar.out I want to be able to put it into the bin directory and use it like system wide commands e.g. ssh, echo, bash, cd... How ...
1
vote
0answers
314 views

Zip a file as a subcommand

I am trying to combine these two commands into one: zip -r my-app.zip ./*; aws lambda update-function-code --function-name myFunction --zip-file fileb://my-app.zip I have tried: <() aws lambda ...
2
votes
1answer
52 views

Corporate exchange server strips Solaris email attachement

I need to send file(s) from a Solaris 11.3 server through the corporate network to a user on a PC . I would like to eliminate winscp and automate this process. This test works: uuencode /var/adm/...
0
votes
1answer
50 views

Executing a binary at works but binary is not actually at path

If I run /usr/libexec/PlistBuddy testing.plist it works. But if I cd /usr/libexec and run ls -al I can't see PlistBuddy listed in that directory. Why is that?
3
votes
2answers
5k views

Write hexadecimal values to binary file with bash

How can I write an specific number of zeros in a binary file automatically? I write: #!/bin/bash for i in {0..127}; do echo -e -n "\x00" >> file.bin done But looking the file with Bless ...
0
votes
1answer
374 views

Can i modify this search command to ignore binary files?

I have this command which gets generated by a little script i wrote called "scan", which I use all the time to look for specific content (variable names etc) inside text files: find "." \ | awk '{...
0
votes
1answer
37 views

where to store files from source [closed]

New to Linux (kinda) I'm wanting to set up my system for building from source. I have read that packages built from source should go into /usr/local/src. However, I have also seen on other forums ...
1
vote
1answer
125 views

How are binary files “binary”?

I understand that a binary file is not simple machine code with zeroes and ones. At a meeting yesterday, my colleague stated that we would need a hexdump editor to read binary configuration files for ...
1
vote
0answers
84 views

Permissions confusion when executing binaries via script

ls -al /home/dmsinst1/sqllib/adm/db2start -r-sr-sr-x 1 root dmsiadm1 93613 Jun 26 14:14 /home/dmsinst1/sqllib/adm/db2start ls -al /home/bpminst1/sqllib/adm/db2start -r-sr-sr-x 1 root bpmiadm1 93613 ...
2
votes
4answers
2k views

Is the bin/ directory for storing binary files?

I have seen many tutorials saying that the bin directory is used to store binary files, meaning there is only 0 and 1 in the files in that directory. However, in many cases, I see files in bin that ...
0
votes
2answers
1k views

Concatenate 2 binary strings in base64 form

I have two BASE64 encoded strings and I would like to get the BASE64 encoding of the binary concatenation of the two string using just the command line. Example: > $ echo -n "\x01\x02" |base64 ...