The tag has no wiki summary.

learn more… | top users | synonyms

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. ...
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
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 ...
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]"; ...
2
votes
2answers
3k 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 ...
12
votes
1answer
13k 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
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 ...
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 ...
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
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, ...
4
votes
2answers
1k views

Cannot execute binary in NixOS - 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 ...
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 ...
4
votes
2answers
9k 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 ...
18
votes
5answers
23k views

Shell: How to read the bytes of a binary file and print as hexadecimal?

In shell, how can I read the bytes of a binary file I have, and print the output as hexadecimal numbers?
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
10
votes
3answers
7k 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 ...
8
votes
4answers
19k views

How to use bash script to read binary file content?

I want to read a character and then a fixed length of string (the string is not null terminated in the file, and its length is given by the preceding character). How can I do this in a bash script? ...
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
344 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 ...
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 ...
1
vote
1answer
127 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 ...
7
votes
2answers
573 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?
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 ...
5
votes
2answers
101 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
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).
1
vote
3answers
163 views

Is there a way to determine when a binary was compiled or installed?

Is there a way to determine when a binary was compiled or installed? For example, I have a binary mdrun_d, and I would like to know when this particular binary was compiled or installed. The system ...
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 ...
4
votes
2answers
172 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 ...