Reputation: 51
I have one .bin file.in that file some data which is important for me and and i want to open that file by using terminal so please help me.I have not any software for that. so give me and command.
Upvotes: 5
Views: 88149
Reputation: 11
6 years later. I hope it'll be useful.
losetup -f --show "/path/to/filename.bin"
LOOP=$$(losetup | grep "filename.bin" | cut -d ' ' -f1)
kpartx -l $LOOP | cut -d ' ' -f1
mount -v /dev/mapper/loop0p1 /mnt/
Upvotes: -1
Reputation: 173
You have to be sure of what you're downloading (because a .bin
file extension is also used for CD/DVD images and backups). Check with the "provider" (Web Page, CD/DVD instructions, etc...) of the file that it can be executed as a program.
From Wikipedia:
A binary file is a computer file that is not a text file. The term "binary file" is often used as a term meaning "non-text file". Many binary file formats contain parts that can be interpreted as text; for example, some computer document files containing formatted text, such as older Microsoft Word document files, contain the text of the document but also contain formatting information in binary form.
If your .bin file is an installer/executable, then follow these steps:
~$ cd /Downloads
(where ~/Downloads
is the folder where you bin file is)~/Downloads$ sudo chmod +x filename.bin
./
followed by the name and extension of your bin file. In this example it would be:
~/Downloads$ ./filename.bin
Note:
If filename.bin
needs administrator priviledges to be executed (like an installer would), write ~/Downloads$ sudo ./filename.bin
and type your password.
~/Downloads
folder is only an example. You can place your bin file anywhere you feel comfortable (yes, even a USB Drive or a SDCard).
Upvotes: 7
Reputation: 181
to be honest i've got the same issue many many times i've downloaded some files.bin , however the only best solution that i've done is to extract the file.bin from windows vmware , you just need to set the share network from windows vmware to linux machine and extract it with winearchiver software to linux as you are connect to the share folder , even if you use chmod 755 file.bin and then ./file.bin , it won't works generally speaking , i am talking as linux user and not windows user , however in some cases combine the solution with windows vmware in order to solve quickly the problem rather than rubbish solutions that won't work .
Upvotes: 0
Reputation: 95
your question is very nice and you can open .bin file easily using terminal,........ so please follow this command
first login as root user using:
sudo su
after that go upto dir in which your .bin file for that use:
cd /yourdir
after reach upto your .bin file use this command:
gksudo gedit filename.bin
Upvotes: -3
Reputation: 7419
Try
sudo vim <filename>
or if you don't like vim:
open -a "<texteditor>" <filename>
where <texteditor>
is your text editor and <filename>
is the file name
Remember to navigate to the folder first
Upvotes: 0