The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
3answers
146 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.
2
votes
3answers
98 views

Split binary data of fixed byte offset by byte position?

I have binary data which I review by xxd -ps in hex format. I notice that the byte distance is 48300 (=805*60) bytes between two headers where the separator is fafafafa. There is the beginning of ...
4
votes
4answers
167 views

How can I convert two-valued text data to binary (bit-representation)

I have a text file with two (2) only possible characters (and maybe new lines \n). Example: ABBBAAAABBBBBABBABBBABBB (Size 24 bytes) How can I convert this to a binary file, meaning a bit ...
2
votes
2answers
33 views

Workaround for busybox head that drops NUL from data

TL;DR: Latest busybox (1.23.2) provided head is buggy and will happily drop NUL characters in the provided data. Replacing the binaries is not an option. I'm using head -[nc] -X in my scripts, is ...
3
votes
2answers
93 views

Convert binary mode to text mode and the reverse option

By the following way I convert a simple binary file into a text file od –t x1 Check.tar | cut –c8- > Check.txt What is the opposite way to convert the Check.txt to Check.tar as the original file ...
1
vote
2answers
76 views

How to obtain a plain (raw) binary dump of any file in Unix/Linux?

I have read many similar question on the Stack Exchange community but none of them address a 'clean' binary dump. I have used: xxd and sed combinations to try to obtain a clean binary dump from any ...
1
vote
2answers
75 views

ls or find option to exclude binary files

How can I list only files that aren't compiled code in the current directory? I'm reviewing the custom scripts and code on several HPUX and Linux servers before transferring them to a newer system. ...
-2
votes
2answers
45 views

How can I identify if a binary file is set-user-ID? [closed]

In Linux, how can I identify if a binary file is set-user-ID? Can I use ls -l?
0
votes
1answer
76 views

How do i write a shell script so that when i compile my c++ program it will put the binary into the Binary Directory

I have a directory called Binary and bunch of source files: ./ ├── Binary/ ├── lesson02.cpp ├── lesson04.cpp └── lesson06.cpp when I compile the source code g++ lesson01.cpp -o lesson01 I want ...
0
votes
2answers
50 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
11
votes
1answer
318 views

When can I edit strings in an executable binary?

I have an executable binary; let's call it a.out. I can see the binary contains strings $ strings a.out ... /usr/share/foo .... I need to change the string /usr/share/foo to /usr/share/bar. Can I ...
1
vote
1answer
28 views

file (vdi) increase (at double) size after split and then cat operation

I'd splitted a vdi file with 7 gigabytes and then joined with cat command. The file works normally on VBox, but get 14 gigabytes after be re-joined. The exact operation was: $ split -- bytes=2000M ...
0
votes
1answer
156 views

Can't run binary executable on Ubuntu 12.04

I get the following error: ./cataclysm: command not found when trying to run this executable on a Linux server over SSH. When I run ldd cataclysm, I get: linux-gate.so.1 => (0xf7759000) ...
4
votes
3answers
142 views

Modifying binary during execution

I often come across the situation when developing, where I am running a binary file, say a.out in the background as it does some lengthy job. While it's doing that, I make changes to the C code which ...
18
votes
5answers
2k views

Generating a random password; why isn't this portable?

I want to generate a random password, and am doing it like so: </dev/urandom tr -dc [:print:] | head -c 64 On my laptop, which runs Ubuntu, this produces only printable characters, as intended. ...
1
vote
1answer
135 views

Equivalent of Java's String.getBytes() in Unix Shell (Cygwin)

Let's say I convert my string into byte array. byte[] byte sUserID.getBytes(“UTF-8”); //Convert User ID String to byte array Now I need to write a script on Shell that will have exactly the ...
0
votes
1answer
118 views

Convert serialized Java object to human readable

I have object of class class X { private DateTime dt; "constructor, set/get" } I have one instance of this object serialized in file.bin. I want to show content of `file.bin on the Linux ...
2
votes
1answer
70 views

Find/replace on block device?

Let's say I have an unmounted block device /dev/sda, and I want to replace all instances of MyPassWord with XXXXXXXXXX. (Hopefully my goal is obvious.) What's the easiest way to do this?
2
votes
1answer
292 views

How to get binary representations of strings in Shell?

I'm using openssl dgst -sha1 -binary to get hash values of my strings in binary format. (I'm using -binary flag because my version of openssl adds "stdout" before each hash value on default output, ...
4
votes
1answer
229 views

how to run a software in linux without installing it

I am trying to run Rstudio download page link. On my Windows machine, I just downloaded the zip file from zip/tarballs section and was able to run .exe without installing anything on my machine. I'd ...
1
vote
1answer
95 views

How can I teach grep to treat properties-files like text-files

Since I upgraded grep from 2.16 to 2.21 it treats .properties-files like binary files. This sucks because I like to use grep -I ... to exclude binary files from the search results and ...
0
votes
1answer
28 views

Combining parts of original Android with newer sources to create a new image [closed]

Hi I wanted to talk to the pros on the compiling and decompiling Android source and binaries respectively. Is it possible to decompile an Android OS running in a device and get its source, so that you ...
3
votes
2answers
2k 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]"; ...
0
votes
1answer
223 views

using CURL to transmit binary data over POST parameter

How can i use CURL to send binary data through a specific post parameter? E.g in: curl 'http://www.example.com' -H 'hi:hi' --data ...
0
votes
0answers
125 views

How to use binaries in jailshell?

I'm offering jailshell (on CentOS- whm) access to someone in order to use the folder sync tool called Unison (Some sort of bidirectional rsync) That's for the background. Unison is installed, as ...
1
vote
0answers
255 views

Can not execute Heroes of Neweth binary file

I'm trying to install Heroes of Newerth on openSUSE 13.2, KDE 4.14. I downloaded the client from official website. I checked is executable option in properties. But when i double clicked on the file ...
1
vote
2answers
255 views

Where to download binaries of coreutils?

I'm trying to install some commands on an android device (namely file and a better version of ls), and I'm looking for the ARM binaries for it (namely the 5TE architecture) but I'm unable to find a ...
0
votes
1answer
81 views

Are Linux Executables Compatible through All (x86_64) Linux Systems? [closed]

The Windows desktop proprietary softwares I see are usually distributed as statically compiled binary only files, possibly with some dlls, and the needed data files bundled in a package unpacked in a ...
0
votes
1answer
28 views

Linux/Unix Executables && FSH with libs/executing sequence

Okay, relatively new Linux User here. (Messed around with Linux for ages, looking for more depth) I know that all files in Linux can be executed if they have the executable bit. What are these ...
0
votes
1answer
563 views

unsquashfs fails

Debian 7.0, I extracted the firmware.bin image using binwalk. The extracted content is squashfs-root folder containing subdirectories, and a separate file.squashfs file. I tried unsquashfs this ...
5
votes
1answer
97 views

Representing/quoting NUL on the command line

Can \0 be used on the command line? Background For testing corner cases in GNU Parallel I was curious whether all characters were correctly quoted on the command line. Most of them are: perl -e ...
1
vote
1answer
536 views

Converting a file from ASCII to Binary

I have a series of files that are either delimited and fixed width, containing many rows of both character and numeric values like so (delimited example): Smith,Audrey,Ford,2000,21300.99 ...
4
votes
3answers
200 views

How to convert an unsigned decimal (less than 1<<32) to 4 bytes (binary) in bash?

Example: $ decimal=$(( RANDOM << 17 | RANDOM << 2 | RANDOM >> 13 )) $ echo $decimal $ printf "%08x" $decimal | xxd -r -p >bytes The result is in bytes file. Can it be done in ...
5
votes
2answers
163 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 ...
1
vote
2answers
135 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 ...
2
votes
2answers
437 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 ...
1
vote
1answer
132 views

How could i flip content of a binary file with bash commands

I was wondering if it's possible to do bitwise conversion on a binary file, with bash commands, (in my case bitwise negation).
4
votes
2answers
931 views

Convert file with integers written in ascii to binary file of integers

I have a file that contains a long list of integers written in ascii separated with newlines, like such: -175 2 -19345 345592 -45 2355 etc... I want to convert this file into a "binary" file ...
5
votes
2answers
3k views

tr complains of “Illegal byte sequence”

I'm brand new to UNIX and I am using Kirk McElhearn's "The Mac OS X Command Line" to teach myself some commands. I am attempting to use tr and grep so that I can search for text strings in a regular ...
2
votes
2answers
4k 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 ...
3
votes
1answer
360 views

md5sum command binary and text mode

The GNU md5sum command has two modes: binary mode and text mode. I guess the difference is only on how newline characters are handled? Am I right? On GNU/Linux, the two modes always produce same ...
6
votes
2answers
344 views

In an empty environment, how are executables found?

For experimentation purposes I created a binary that prints the $PATH, and calls which as follows: #include <stdlib.h> #include <stdio.h> int main() { char *path = getenv("PATH"); ...
0
votes
2answers
64 views

Is it possible to cache external binary in a shell script?

My question, might sounds a bit strange, but this morning I read this question: Why is “echo” so much faster than “touch”? I perfectly understand the concept of built-in function, but I wonder if you ...
2
votes
2answers
171 views

How to add new elements to PATH for daemons (or other best practices)?

I want to add some scripts for custom administrative work to a Linux server (Ubuntu 12.04). Ultimately those scripts are callback scripts from at least one daemon (PostgreSQL in my case but that ...
0
votes
1answer
55 views

How to issue a warning to administrator (when the administrator issues a system restart) when user has process running

Background I work on a development team and for each project we have a different server setup to emulate the environment of our customers. It can be hard to keep track of what I was doing on each ...
3
votes
2answers
3k views

Why using cat on binary files messed up the terminal and how?

If I understand correctly the cat manual: concatenate files and print on the standard output cat will take files as argument and print them on standard output. What I don't get is if I use the ...
1
vote
1answer
364 views

How to install an Intel binary file on ARM?

I am trying to install a binary file, and I get the output as "Cannot install binary". When I did file .bin, the output is: c64plus-imglib_2_02_00_00_Linux-x86_Setup.bin: ELF 32-bit LSB executable, ...
13
votes
4answers
463 views

A shell-like environment for binary processing

This question came to me a couple of times before, now in response to the question Loop through binary data chunks from stdin in Bash Answers given in ...
5
votes
1answer
1k views

Loop through binary data chunks from stdin in Bash

I'm looking for something like while IFS= read -r -n $length str; do ... done but for binary data. Is it possible to do this using dd or other tools? Is there some technique to make these tools able ...
4
votes
3answers
7k views

Can xxd be used to output the binary representation of hex number , not a string?

I would like to generate a raw binary packet from hex in the command line for the purpose of testing a protocol. I'm hoping its simpler to do it this way than writing an aplication. Here is what ...