The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
0answers
8 views

Questions on /dev/mem, dumping using dd, and .bin and .rom formats

Following @ack 's answer on How to dump BIOS data to a file I would like to know: 1) when one is dumping memory from /dev/mem, is the file data in binary or some other format? I have done a dump ...
4
votes
2answers
5k views

Use curl to send binary file through POST with content-type multipart/form-data;

A post request is made to: http://www.example.com/example/ and the post data is as follows: ------WebKitFormBoundaryB8NNdk2kNdndnnn Content-Disposition: form-data; name="picture[uploaded_data]"; ...
4
votes
1answer
53 views

Decode binary output from Fortran program created on Sun Sparc system

I have one f77 file,which was created on SunSparc machine.I know that each record contains 5 reals and one integer.Is there any way how I could unpack that file on my Ubuntu 16.04 Intel little-endian ...
1
vote
1answer
3k views

MySQL aborting during initial db installation

Linux version: shell> cat /proc/version Linux version 3.2.0-4-686-pae (debian-kernel@lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Debian 3.2.46-1+deb7u1 Installing MySQL 5.6....
13
votes
5answers
26k views

Binary to hexadecimal and decimal in a shell script

I have a context where I need to convert binary to hexadecimal and decimal and viceversa in a shell script. Can someone suggest me a tool for this?
2
votes
3answers
2k views

Pasting binary data into a Unicode terminal

I need to be able to paste binary data into a terminal. For some reason, every byte outside the ASCII range (0x80-0xff) is pasted as the same three byte sequence 0xef 0xbf 0xbd. For example: $ echo -...
4
votes
1answer
32 views

Binary diff of two folders

Let's say I have two folders: before and after. ./before: bash ./after: bash The bash in the before folder differs from the bash in after. Using bsdiff or a similar program, is there a way to ...
0
votes
0answers
12 views

The included VM could not be uncompressed (GZIP/UNCOMPRESS)

I have a .bin file to install Bladelogic NSH console and I want to install it in my OSX(Capitan). When I execute the .bin file in the Terminal I get the following error: Preparing to install... ...
2
votes
4answers
48 views

How to check which binaries depend on certain files in /lib?

I know that if I do the command ldd <name> on a binary file in /bin or /sbin I can see which libraries it uses. How do I do the reverse? I.e. do a command on a file in /lib and see what binaries ...
2
votes
4answers
576 views

Execute binary code

I have a binary code and I want to run it. 01001000 01100101 01101100 01101100 01101111 00100000 01010111 01101111 01110010 01101100 01100100 How can I create a file "application/x-executable" and ...
9
votes
2answers
4k views

How to store an image file in bash variable?

After I use the following command, pngString="$(cat example.png)" echo -n "$pngString" > tmp.png I can't open the tmp.png as a PNG file. Maybe some information is lost when I use $pngString ...
15
votes
10answers
4k views

How to view a binary file?

From what I understand, a compiler makes a binary file that consists of 1's and 0's that a CPU can read. I have a binary file but how do I open it to see the 1's and 0's that are there? A text editor ...
2
votes
3answers
1k views

is there a way to run a linux binary on OS X

Is there a way to run a linux binary in OS X? I tried to run a binary but it said it isn't executable.
0
votes
2answers
56 views

What can cause my shell to look like this? [duplicate]

I'm currently developing a home automation framework for my apartment. This involves getting JSON over Serial from an Arduino. When the JSON can't be parsed (usually only on startup) I log it as an ...
2
votes
1answer
6k views

“No such file or directory” on files that exist? [duplicate]

In the past day, I've found at least 4 binaries that say "bin-name: No such file or directory" when I try to run them. Even if I type part of the name and tab complete it, I get the same error. I'm on ...
11
votes
3answers
619 views

How can I work with binary in bash, to copy bytes verbatim without any conversion?

I am ambitiously trying to translate a c++ code into bash for a myriad of reasons. This code reads and manipulates a file type specific to my sub-field that is written and structured completely in ...
1
vote
2answers
72 views

What's the POSIX way to read an exact number of bytes from a file?

Just hit this problem, and learned a lot from the chosen answer: Create random data with dd and get "partial read warning". Is the data after the warning now really random? Unfortunately ...
5
votes
3answers
115 views

How does grep decide that a file is binary?

I have a large utf-8 text file which I frequently search with grep. Recently grep began reporting that it was a binary file. I can continue to search it with grep -a, but I was wondering what change ...
3
votes
2answers
85 views

Why does “head /bin/ls” reset the terminal

If you do something silly like cat /var/log/wtmp your terminal can get messed up as shown in the screenshot. I know there are a number of ways of fixing this. One of the ways not mentioned on that ...
3
votes
4answers
2k views

Fetching individual bytes from a binary file into a variable with bash

I need to make a fairly simple bash script to pull bytes one at a time from a binary file, send it out a serial port, and then wait for a byte to come back before I send the next one. This is ...
9
votes
3answers
4k views

Are there alternatives for `dd`?

What other tools should I use to read and write files with truncation, seeking and skipping. dd's command line options seem inconvenient and foreign and I don't like choosing between slow, but precise ...
0
votes
1answer
24 views

Possible problems deleting /tools in LFS

I recently made a Linux From Scratch and now I want to delete the /tools directory. But before rushing through it, I ran ldd /bin/* | grep '/tools' Which gave me this liblzma.so.5 => /tools/...
0
votes
1answer
49 views

Install Java 1.4.2 on recent Amazon Linux [duplicate]

I need Java 1.4.2 on a up-to-date Amazon Linux 2015.09 server. I've tried to install j2sdk-1_4_2_19-linux-ia64-rpm.bin. When I execute this file, I get an error message: line 442: ./install.sfx.12314:...
4
votes
4answers
6k views

Ubuntu vs. CentOS and Binary Compatibility

I am trying to install software that is built on CentOS 4.7. Do you know if it will also run in Ubuntu? I read CentOS is 100% binary compatible. Is the same true for the most recent version of Ubuntu?
3
votes
2answers
258 views

Alter certain bytes in many files

I need a large number of damaged .png files in order to test my project. To that end, I need to set all bytes from the 0x054-th to the 0xa00-th to 0. .png files contain chunks with checksums, I want ...
1
vote
1answer
23 views

Find all files (including libraries) a binary depends on

I'd like to find all files a binary depends on (including libraries, configuration files, basically all files referenced in the binary). I know, that you can find shared libraries with objdump, ldd, ...
26
votes
3answers
33k views

How to find binary executables within a directory

How do I list all binary executable files recursively within a directory? I use find command like this: find /mydir/mysubdir -executable -type f All executable files are listed (excluding ...
-2
votes
1answer
61 views

how to fix potentially infected binary files? [closed]

when I installed the updates on my computer (Ubuntu 14.04), I typed the password, thinking that it was asked for regular updating , but when I noticed some strange behavior and crash at this moment, I ...
0
votes
1answer
39 views

Convert line of ASCII file to binary packet for NetCat

I have an ASCII file, which looks like this: 36,36,0,1 36,36,0,2 ... What I want to do is to send every row of it as one binary TCP segment's payload with NetCat. To convert the number from file ...
34
votes
2answers
15k views

Fix terminal after displaying a binary file

I'd tried command cat with an executable file: cat /bin/ls Now I can't read any word in this terminal (Linux console). How can I fix it?
7
votes
4answers
800 views

How to gather byte occurance statistics in binary file?

I'd like to know the equivalent of cat inputfile | sed 's/\(.\)/\1\n/g' | sort | uniq -c presented in http://stackoverflow.com/questions/4174113/how-to-gather-characters-usage-statistics-in-text-...
3
votes
2answers
153 views

Trace a binary stream from a device file

I'm debugging a binary stream that is coming from a device file. I would like to have the output printed out in real time as hex values. So far I've used tail -f /dev/ttyAPP2 | hexdump -C but after ...
219
votes
5answers
43k views

/usr/bin vs /usr/local/bin on Linux

Why are there so many places to put a binary in Linux? There are atleast these five: /bin/ /sbin/ /usr/bin/ /usr/local/bin/ /usr/local/sbin/ And on my office box, I do not have write permissions ...
1
vote
2answers
453 views

Extract data between two matched patterns in a binary file

I am trying to extract a jpeg image from a binary text file. I want to extract all data between 0xFF 0xD8 (start of image) and 0xFF 0xD9 (end of image) inclusive. Earlier, I have successfully run the ...
4
votes
1answer
59 views

Finding out binary's compiling computer name

We have recently in our workplace stumbled upon a really old binary file that originates from unknown old computer. However in order to run this binary we need to get some local resources and ...
5
votes
2answers
287 views

Create the same PNG with ImageMagick 2 times: Binaries differ

I create two images that should be identical, but their binaries are different: $ convert -size 1x1 xc:white out1/w.png $ sleep 1 $ convert -size 1x1 xc:white out2/w.png $ diff out1/w.png out2/w.png ...
21
votes
2answers
26k views

How to convert a shell script into a binary executable?

I want to convert my shell scripts into binary executable so that nobody else could edit or read it. Is there a way to convert it into a binary executable?
2
votes
1answer
38 views

Is there a way to create endless stream with custom character?

I need to create an endless stream of characters like /dev/zero but I need it to spam custom character (like 'a') instead of 0x00. Is there a way to do it?
1
vote
1answer
195 views

Apply SHA256 and Base64 to string in script

I'm trying to apply SHA256 and then Base64 encode a string inside a shell script. Got it working with PHP: php -r 'echo base64_encode(hash("sha256", "asdasd", false));'. But I'm trying to get rid of ...
0
votes
2answers
61 views

What does mean by “Debian on track to prove binaries' origins”?

I found an article on The Register of the UK about the reproducible builds in Debian. I couldn't understand much from it. Could anyone simply this for me, please? Here's the link: Reproducible Builds
0
votes
1answer
52 views

How to recognize binaries installed in `~/bin`? [duplicate]

I am trying to execute some binaries manually installed in a bin directory in my $HOME (normal user). Files are present in /home/user/bin and have exec permission: $ ls -la ~/bin/ total 120 drwxr-...
2
votes
1answer
240 views

How do I repair binaries?

So, basically I was messing up with minix and qemu and I messed up too much. me@meplepl ~ $ which bash: /usr/bin/which: cannot execute binary file: Exec format error me@meplepl ~ $ file /bin/...
2
votes
2answers
351 views

How can I effectively purge a manually installed package?

I installed SBCL 1.2.3 on Ubuntu 12.04 by downloading sbcl-1.2.3-x86-64-linux-binary.tar.bz2, and running sudo bash install.sh However, I was curious about how I would be able to uninstall it? It ...
3
votes
1answer
96 views

Is there a way to “stabilize” past built unstable Gentoo binary packages without rebuilding?

Here's the scenario: build some ~amd64 package versions on your binhost later those same package versions go stable in portage, so no version bumps involved even if packages are listed stable in ...
6
votes
2answers
12k views

What is Binary package? How to build them?

I want to get detail about binary package and run them on linux. I am running Debian base (Ubuntu/Linux mint) Linux os. How to build binary package from source? And can I directly download binary ...
4
votes
1answer
1k views

In emacs, is there a way to Hex edit/view a buffer without losing the undo info?

When I use hexl-mode in emacs, it discards the buffer's undo info. Is there another way to hex-edit the buffer and yet retain the undo info? If there is no alternative hex-editor, is there a hex-...
3
votes
2answers
33 views

How to set binary installed by package manager as default?

I installed a newer version of tcpdump via MacPorts and would like to make it the default binary. $ which -a tcpdump /usr/sbin/tcpdump /opt/local/sbin/tcpdump For now I set an alias, but that of ...
0
votes
0answers
16 views

Where exactly is page permissions set in fs/binfmt_elf.c?

As I understand that in linux, the ELF loader (binfmt_elf.c) is the one that loads a particular binary into memory. Usually data will be RW and code segment will be RE. But where exactly in the source ...
9
votes
2answers
1k views

Can hd and od replace each other?

hd and od are both dump viewers of binary content. Can hd be used wherever od is and vice versa?