We’re rewarding the question askers & reputations are being recalculated! Read more.

Hot answers tagged

29

When dealing with computers, there are two interpretations of the word binary. In terms of number system, it refers to a base 2 number system which uses two symbols, 0 and 1. When speaking of a file, it refers to a file containing non-textual data (executables, libraries, data files etc.). A binary file that can be run as a process is called an executable ...


9

Nearly all modern computers deal with bytes, instead of the individual bits. A single byte, as you may know, can store any of 256 different values; from eight zeroes to eight ones. When you open the binary file in a text editor, it is showing you these byte-sized chunks instead of each individual bit. The symbols it picks are determined by your editor's ...


7

Start vi in binary mode - then you can run xxd to get hex view, binary view and edit the file as you would. (Of course most of these are read-only, but that's not about the editor and more the permissions/SIP). vi -b /bin/ps Then to convert the buffer to bits of 1 and 0 :%!xxd -b Then you can see all the Mach-0 executable binary goodness, right from ...


6

Instead of using Finder aliases, use Terminal to create symbolic links (see man ls for details): ln -s /path/to/python3.3/binary /usr/local/bin/python ln -s /path/to/python2.6/binary /usr/local/bin/python2.6 It's usually not a good idea to mess with /usr/bin content (will be wiped out with the next upgrade). Use /usr/local/bin instead and make sure it ...


6

You can achieve it with dd command. Here's an example: $ hexdump StringComparison | head -1 0000000 cf fa ed fe 07 00 00 01 03 00 00 80 02 00 00 00 $ printf '\x11\x11\x11' | dd of=StringComparison bs=1 seek=4 count=3 conv=notrunc 3+0 records in 3+0 records out 3 bytes transferred in 0.000293 secs (10238 bytes/sec) $ hexdump StringComparison | head -1 ...


5

It means that the file has extended attributes. To see these attributes, run xattr -l file, to see the extended attributes of a particular file, or ls -l@ to see the extended attributes of all files in a particular directory. See the man page for xattr as well.


4

You could install it using Homebrew. It is part of the brew ex-vi package, e.g.: brew install ex-vi


3

The first column reflects the address/position of the data within the file (on the first line of your output it should start with 0000000 unless you have used xxd -s), the last column contains the textual representation of the file content (for bytes which have a printable ASCII value).


3

The InfoPlist.strings file you mention is a binary formatted property list. You can convert and edit these files with developer tools such as plutil. The following article walks through the steps required, Show folders last in Finder.


3

Download TextWrangler from the Mac App Store. It automatically converts binary strings files and plist files for editing and is a generally good code editor.


2

Open the Finder, on the menu bar go to 'View', then scroll to 'View Options'. Arrange by 'Kind', and sort by 'Kind' as in the screenshot, and the folders will be at the top.


2

Yes, since you didn't install either via script, a package manager or an .pkg you can simply delete the file and you're done.


2

What you did was move the geckodriver executable into ~/.local, and rename it to bin. The directory must exist first before mv can move anything into it, or it will assume you intend to rename the file at the destination. You can either delete ~/.local/bin with rm ~/.local/bin and make the directory with mkdir ~/.local/bin, then redownload it, or you can run ...


2

Each platform comes with one or more specific platform binary interfaces that define how operating systems (or stand-alone programs that are not operating systems) must be structured. The first run parts of an operating system is generally defined in binary machine code. The CPU will read the machine code, divide it into instructions and carry out those ...


2

A few things for you to try: Per this SO link, do lsof path-to-filename to list all processes accessing that file. There's also a frontend to lsof called Sloth. The problem with this is if the programme doing the writes only edits the file momentarily (like if it did touch foldername) then you probably wouldn't see it, since lsof only lists current ...


1

I do that using a small Python script, included below: import sys from macholib.MachO import MachO m = MachO(sys.argv[1]) __TEXT = (cmd for load_cmd, cmd, data in m.headers[0].commands if getattr(cmd, 'segname', '').rstrip('\0') == '__TEXT').next() print '__TEXT segment: offset %x size %x' % (__TEXT.fileoff, __TEXT.filesize) f = open(sys.argv[1], '...


1

The simplest answer to your question is: For efficiency. As others have said in their answers, files are displayed using a more compact notation than raw binary code, because raw binary code is unfathomably inefficient as a means of communicating data. Take the ps program you displayed using vi. I'm not sure about the MacOS version of the command, but on my ...


1

With my previous comment, it appears that the loader.h file located at https://opensource.apple.com/source/xnu/xnu-4903.221.2/EXTERNAL_HEADERS/mach-o/loader.h.auto.html IS the official documentation. Near the top it says /* * This file describes the format of mach object files. */ And the comments in the file are more extensive than I realized.


1

By default, packages are installed in the way you describe... "Bottles" are precompiled binaries downloaded as compressed tape archives, the contents of which are then "poured" into the appropriate paths. If you specify options, or use custom compile flags, then naturally brew will build from source. But if you for example, brew install nmap htop bmon, it ...


1

The CPU is running a program. The binary contains data read by this program. Based on the values of the 1's and 0's in this data, the program (running inside the CPU) determines where to transfer data from various storage locations inside and outside of the CPU. Many of the transfers pass the data through logic which perform operations. Addition and ...


1

macOS is built on BSD which is a Unix like operating system. The Unix operating system and the C language were created simultaneously. Many of the commands have evolved over time but usually have remain written in the C language. The libraries and the Unix operating system is also written in C. The C language is probably the closest high level language ...


1

If you want to one line it (which I find more convenient): echo 'export PATH=$PATH:"/path/to/your/dir"' >> ~/.bash_profile && source ~/.bash_profile of course you can change this to your preferences (ie. append or prepend to $PATH, .bashrc, .bash_profile, .zshrc, etc.)


1

You can use the work-around published here to solve the problem: https://github.com/iriscouch/build-couchdb/issues/77 The work-around consists of disabling the generation of the info pages (manual). It seems this error is there because you have an older, incompatible version of TeX. Perhaps you're using an old version of OS X.


1

This is specific to my set up, and I didn't do anything in particular to find out what was writing to Documents. But, maybe this will help someone in the future. Spotify was set up to write cache to Documents.


1

Stub applications are smaller apps that do work for larger, more complex apps. For example, an app can request information from a stub app concurrently with a main process that the original app is running. Then, the stub app can return information back to the main process that initiated the stub binary.


1

It should run just fine on Mountain Lion, and it should not do any damage to the Mountain Lion machine. There is only one way to know for sure if it will work - installing it. I didn't want to do this because I am not sure how to test it, but will say that it shouldn't be a terrible mistake to install. It will either not run (due to various things like ...


1

If you have Xcode, it will open plist files, and display them in a nice editable tree-view.


Only top voted, non community-wiki answers of a minimum length are eligible