The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
2answers
48 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
25 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
41 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 ...
1
vote
2answers
62 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
43 views

How to install 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 Output is: c64plus-imglib_2_02_00_00_Linux-x86_Setup.bin: ELF 32-bit LSB executable, Intel ...
0
votes
0answers
53 views

Compile OS with gcc and ld on Linux

I'm practicing operating system development and am having trouble getting gcc and ld to produce pure binary without any metadata or section labels. For example: int function(){ return 100;} would ...
6
votes
1answer
81 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
98 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
2answers
63 views

How to add an audio file to a shell script

How can I add an audio file (OGG vorbis) into a shell script making the script as small as possible and at the same time being able to execute it on as most systems as possible? I want the audio file ...
1
vote
2answers
99 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
73 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 ...
1
vote
1answer
120 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
165 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 ...
7
votes
1answer
364 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
145 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 ...
3
votes
1answer
30 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 ...
5
votes
1answer
60 views

Merge nonzero blocks of huge (sparse) file A into huge file B

I have two partial disk images from a failing hard drive. File B contains the bulk of the disk's contents, with gaps where sector reads failed. File A is the result of telling ddrescue to retry all ...
-2
votes
2answers
114 views

How to handle binary data in Linux [closed]

One of the my servers gives me data with Content-Type: application/binary, i.e data that I am getting looks like some alien data. Now I need to convert that data into plain data, but I am not aware ...
3
votes
4answers
105 views

Bash: For loop with binary range keeping control value binary

Let's say I have two bash variables that contain binary values: a=0011 # decimal 3 b=1000 # decimal 8 Is there a way I can loop through all the possible values between $a and $b keeping it binary? ...
0
votes
2answers
94 views

How can I format the output of stat to contain the null character?

I want to delimit file paths by using the null character (NUL, \0, ...) just like for example find -print0 does. I'm using bash and I tried the following without success: find $1 -print0 > ...
0
votes
1answer
32 views

Solaris 10 - what is appserv and boot.server? What do they do?

I'm working in a Solaris 10 zone on legacy startup scripts in the /etc/rc3.d/ There are two items that I don't know what they do. I know how legacy start-up works but just don't know what these items ...
5
votes
3answers
710 views

ASCII binary tools?

Which is a good tool to convert ASCII to binary, and binary to ASCII? I was hoping for something like: $ echo --binary "This is a binary message" 01010100 01101000 01101001 01110011 00100000 ...
3
votes
2answers
66 views

Get “Text Content” of Files

I was wondering if there is a tool to scrape text content of a file. Basically I would like to put in a pdf, word document, compressed file or anything else and get the text it contains out. There ...
1
vote
1answer
2k 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 ...
1
vote
1answer
1k 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 ...
3
votes
1answer
348 views

Cannot execute binary - No such file or directory

I tried to install the current oracle jre on a VM running NixOS. Now the following happens: [michas@cc:~]$ tar xvzf jre-7u40-linux-x64.tar.gz |grep bin/java jre1.7.0_40/bin/javaws ...
7
votes
2answers
423 views

How could I use Bash to find 2 bytes in a binary file, increase their values, and replace?

I'm trying to find two bytes inside binary file, then increase value of those two bytes and replace them inside file. Those two bytes are on positions 0x82-0x83. For now on I have successfully ...
0
votes
1answer
91 views

How can I create my own imagemagick binary releases?

I'm looking for a way to build ImageMagick binary distributions for deploying my app. I only need it for Kinux 64-bit (Ubuntu/Debian) and OSX. Actually building it is fine, but I have no idea how to ...
2
votes
3answers
3k views

convert a hex string to binary and send with netcat

I have a binary file that I can send with netcat: $ nc -l localhost 8181 < my.dat The file contains this: $ xxd my.dat 0000000: 0006 3030 3030 4e43 ..0000NC What I really ...
0
votes
1answer
84 views

stream a certificate to stdout to download it in php

Related Questions : when downloading certficate binary data , result is invalid certificate Download binary stream data from browser using PHP with web service “ downloaded file is corrupted ” ...
4
votes
1answer
560 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?
2
votes
2answers
160 views

dowload find binary , accidentally deleted /usr/bin/find binary file

I accidentally deleted all some binaries by rm -r f*, when my current directory was /usr/bin/ . So i couldn't install any files including findutils, since 'find' binary is the prerequisite for ...
2
votes
1answer
2k views

Passing binary data to curl without using a @file

Is it possible to use curl and post binary data without passing in a file name? For example, you can post a form using binary via --data-binary: curl -X POST --data-binary @myfile.bin http://foo.com ...
3
votes
2answers
100 views

Is adding ./bin a bad idea

I can't think of any reason why adding ./bin to my PATH environment would be a very bad idea. I usually create bin folders in my projects that I am working in and I hate doing bin/command, it would ...
7
votes
5answers
5k 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?
9
votes
1answer
4k views

how to convert a shell script into binary executable?

I want to convert my shell scripts into binary executable so that nobody else could edit or read it.Is there any way to convert it into binary executable?
1
vote
1answer
387 views

Latest (or at least non-ancient) Chromium binary?

I've recently been migrating to Puppy Linux (last OS was Ubuntu,) and the only version of Chromium currently available is about as old as the one in the Ubuntu repositories. I really suck at have not ...
0
votes
1answer
197 views

Single-user binary installation location?

I'd like to install a binary for only my user, because I don't have root, and therefore don't have access to /usr/bin. I've tried ~/bin, and it can't find the binary. I'm on Mac OS 10.6.7. Is there ...
2
votes
1answer
1k views

How to enter non-ascii characters using hex or octal codes in vi

I'm trying to write a golfing library for postscript. But it needs to be condensed itself. So I need a convenient way to type-in arbitrary bytes within mostly ascii text. I know this can easily be ...
1
vote
2answers
869 views

diff binary files of different sizes?

Is there a neat way to see the difference between two binary files? They are mostly the same, but some bytes are changed, and one of the files has sequences inserted in some places. Diffing the ...
0
votes
1answer
399 views

Cannot execute binary file on Linux server [closed]

I'm currently trying to run Knime (a Java-based program) on a Linux server, and every time I try to execute the file (knime) it gives me a "cannot execute binary file" error. I've posted the relevant ...
0
votes
1answer
267 views

Output png as binary [closed]

Title says it all. I'm on a unix machine, can't figure it out. Sublime Text 2 opens the PNG as Hex and TextMate as ASCII. I need binary. How can I do it?
3
votes
2answers
124 views

Make ls distinguish scripts from binaries in output

Is it possible to make ls distinguish executable scripts from actual compiled binaries? The permissions are most often the same (+x), and with ls -F you get an asterisk suffix (*) for both, so it's ...
5
votes
2answers
260 views

Is it possible to keep a FreeBSD system up to date (base system + packages) using only binaries?

I have been using Debian and NetBSD systems for a long time, and I have got used to do binaries upgrades for the base system and for packages (using pkgin with NetBSD) Now the NetBSD kernel does not ...
3
votes
2answers
6k views

executing binary file: file not found

I know there are similar questions out there, but I haven't found a solution nor this exact case. The binary was built on Arch Linux using its GCC 4.7. The package works fine on the build system. The ...
5
votes
1answer
1k 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 ...
4
votes
3answers
780 views

Mystery of binary files

This is about files straight from the compiler, say g++, and the -o (outfile) flag. If they are binary, shouldn't they just be a bunch of 0's and 1's? When you cat them, you get unintelligible ...
0
votes
1answer
330 views

Is there a way to use/recompile libgio-2.0 on machine with libc-2.5?

I have a program (JavaFX 2, namely), and one of its binaries (libglass.so) requires libgio-2.0.so.0. The problem is, the system, on which I need to run the app, is quite old and mostly out of my ...
2
votes
3answers
822 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 ...
3
votes
2answers
1k views

how to find offset of one binary file inside another?

I have two binary files. One of few hundreds kilos and other of few gigabytes. I want to know whether the whole, smaller, file is contained within the larger one and if so then what is the offset from ...