The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
2answers
51 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
0answers
39 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. ...
-3
votes
2answers
37 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
41 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
47 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
9
votes
1answer
217 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
18 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
74 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) ...
3
votes
3answers
94 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 ...
16
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
98 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
69 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
59 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
254 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
193 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
77 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
23 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 ...
2
votes
2answers
1k 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
164 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
90 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
250 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
144 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
67 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
26 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
345 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
70 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
128 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
171 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 ...
2
votes
1answer
106 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
111 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
287 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
107 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
821 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
2k 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 ...
1
vote
2answers
2k 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 ...
2
votes
1answer
279 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
322 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
60 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
137 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
52 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
2k 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
322 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
440 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
939 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 ...
2
votes
3answers
5k 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 ...
2
votes
2answers
139 views

What is PATH on a Mac OS?

What is the PATH in a Mac OS? I have used it to install global command-line tools, but the only documentation I have found are tutorials for doing just that, with no real explanation of what is ...
4
votes
2answers
1k views

Can vim display ASCII characters only, and treat other bytes as binary data?

I already know vim -b, however, depending on the locale used, it displays multi-byte characters (like UTF-8) as single letters. How can I ask vim to only display ASCII printable characters, and ...
0
votes
5answers
732 views

On executable files in Linux [closed]

It is said that in linux, unlike Windows, there's not a clear border between executables and other files. Well, in Windows, I write a C++ program, then it is precompiled, compiled and then linked to ...
8
votes
1answer
2k 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 ...
1
vote
2answers
720 views

How can I make awk on Busybox treat the entire input with NULL character in between as a single record?

I wrote a base64 encode script for my Busybox system. #!/bin/sh base64encode() { /usr/bin/awk -- ' function asc(char,l_found) { l_found=0; for (i=0;i<=255;i++){ if ...