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.

0
votes
1answer
36 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
23 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
23 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
12 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
34 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
36 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
19 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 ...
0
votes
0answers
128 views

rsync or scp | /usr/bin and /usr/sbin

I have the same version of Linux Redhat installed on two machines. One is physical and the other one is virtual. I would like to know how to rsync or scp the paths /usr/sbin and /usr/bin from the ...
3
votes
1answer
45 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
17 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
261 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
258 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
41 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 ...
2
votes
2answers
588 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
641 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
47 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
2k 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
360 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
378 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
69 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
34 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
98 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
6k 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
88 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
51 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?
7
votes
5answers
5k views

How to reverse the content of binary file

I was solving a challenge where I found a data file with no extension. file command shows that it is a data file(application/octet-stream). hd command shows GNP. in the last line. So if I reverse this ...
-1
votes
1answer
46 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
27 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
461 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
102 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 ...
6
votes
1answer
7k 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
307 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
51 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?
2
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
339 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
35 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
110 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
75 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 ...
-1
votes
1answer
233 views

How does the processor determine each instruction's opcode and operands: looking into binary file with VIM [closed]

I run the command view /bin/ls on FreeBSD 10.3 and I can see the binary file unmodified: Then on vim/view I run the command :%!xxd and I can see the file in hex format as follows. I notice at the ...
1
vote
1answer
46 views

Sending multiple attachments from NX to an email account? [closed]

Previously, I was using uuencode command to send multiple attachments from VNC to Windows using email and it worked fine. However, when i try to send multiple attachments from NX to Windows using ...
0
votes
1answer
385 views

cannot read saved journalctl logs

Reading the content of man journalctl, I came across the following: Storage= Controls where to store journal data. One of "volatile", "persistent", "auto" and "none". If "volatile", journal ...
1
vote
2answers
3k views

How to remove “binary data” from a text file (e.g. bash_history)?

Like discussed in questions like: "How does grep decide that a file is binary?" or "What makes grep consider a file to be binary?" that grep might stop processing files it considers binary. While ...
1
vote
1answer
108 views

How to check whether a binary potentially accesses internet without running it?

Is there a reliable way to check whether a binary executable potentially tries to access the internet (e.g. to phone home) prior to running it? I guess that many binaries use ioctl / socket / connect ...
1
vote
2answers
256 views

swap bits position in linux

i have hex value B455 when i change it to binary i got 1011 0100 0101 0101 i want to swap the bits with a rule of : origin bits index : 0123456789ABCDEF result bits index : D5679123C4EF80AB` ...