I have an MP3 file and I would like to see the file's binary.
How can I do this (preferably on a Mac)?
I have an MP3 file and I would like to see the file's binary.
How can I do this (preferably on a Mac)?
You can use xxd
for this. Open a terminal and do this:
xxd -b foo.mp3
This will give you output like the following:
0000000: 01001001 01000100 00110011 00000100 00000000 00000000 ID3...
0000006: 00000000 00000001 00111011 01011001 01010100 01001001 ..;YTI
To get only the 1s and 0s and no spaces or extra information, do this:
xxd -b foo.mp3 | cut -d ' ' -f 2-8 | sed 's/ //g'
Classique.MP3
in a folder called Musique
that is in your home directory, you will need to use cd
to go into that directory. Open the terminal, and type cd /Users/Maxime/Musique
and then run the command. See here.