Please recommend a hex editor for shell
Can you recommend a hex editor that can be run from shell? I need to be able to edit not only view the content.
command-line software-recommendation text-editor
add a comment |
Can you recommend a hex editor that can be run from shell? I need to be able to edit not only view the content.
command-line software-recommendation text-editor
1
I think you can do it using vim
– Deepal
Sep 12 '13 at 13:00
stackoverflow.com/questions/5498197/…
– Ciro Santilli 新疆改造中心 六四事件 法轮功
May 22 '15 at 15:39
add a comment |
Can you recommend a hex editor that can be run from shell? I need to be able to edit not only view the content.
command-line software-recommendation text-editor
Can you recommend a hex editor that can be run from shell? I need to be able to edit not only view the content.
command-line software-recommendation text-editor
command-line software-recommendation text-editor
edited Sep 12 '13 at 17:57
belacqua
15.9k1473103
15.9k1473103
asked Sep 12 '13 at 12:04
aviranaviran
416148
416148
1
I think you can do it using vim
– Deepal
Sep 12 '13 at 13:00
stackoverflow.com/questions/5498197/…
– Ciro Santilli 新疆改造中心 六四事件 法轮功
May 22 '15 at 15:39
add a comment |
1
I think you can do it using vim
– Deepal
Sep 12 '13 at 13:00
stackoverflow.com/questions/5498197/…
– Ciro Santilli 新疆改造中心 六四事件 法轮功
May 22 '15 at 15:39
1
1
I think you can do it using vim
– Deepal
Sep 12 '13 at 13:00
I think you can do it using vim
– Deepal
Sep 12 '13 at 13:00
stackoverflow.com/questions/5498197/…
– Ciro Santilli 新疆改造中心 六四事件 法轮功
May 22 '15 at 15:39
stackoverflow.com/questions/5498197/…
– Ciro Santilli 新疆改造中心 六四事件 法轮功
May 22 '15 at 15:39
add a comment |
9 Answers
9
active
oldest
votes
emacs
has a hexl-mode for hex editing.
4
hexl-mode isn't suitable for large files or disk partitions, since it loads the whole file into an emacs buffer. It's great for small files if you're already comfortable with emacs.
– Peter Cordes
Feb 15 '15 at 23:36
1
@PeterCordes, for editing a disk, simplydd
the region you want to edit into a file and open that in emacs, thendd
it back.
– psusi
Feb 17 '15 at 15:21
5
@psusi The problem is, I shouldn't have to go to that effort to edit a file
– Cole Johnson
Nov 11 '15 at 3:54
1
@ColeJohnson, we aren't talking about editing a file; we're talking about editing an entire raw hard disk.
– psusi
Nov 11 '15 at 23:15
2
@psusi On my Windows machine, I can use HxD and open up a disk just like any other file.
– Cole Johnson
Nov 15 '15 at 6:54
add a comment |
xxd
This tool is the most commonly available I have found for this type of task (available by default on both latest Ubuntu and macOS). You can remove the ascii readable part on the right if needed using -p
and you can revert (change ascii input to binary data) using the -r
function. Here are some simple example uses:
Converting to hex with ascii view:
echo example | xxd
Converting to a hexdump (no ascii view on the right):
echo example | xxd -p
Converting from a hexdump back to binary data:
echo 746573740a | xxd -p -r
You can get much more complex with this in shell scripts. I have actually used this and "dd" to scan for specific sequences and modify them in a predefined fashion all from a shell script using nothing but bash, dd
, and xxd
. You actually don't need dd for this either as you can "seek" to a specific location and write to that location the byte sequence you need. The biggest advantage to this approach is its easily scriptable.
1
xxd seems to be installed on Ubuntu 16.04 by default, which is SWEET! Thanks!
– GlenPeterson
Sep 30 '16 at 0:44
Also available by default on MacOS!
– thom_nic
Jul 12 '17 at 12:41
add a comment |
There is also DHEX
apt-cache show dhex
ncurses based hex editor with diff mode
This is more than just another hex editor: It includes a diff mode,
which can be used to easily and conveniently compare two binary files.
Since it is based on ncurses and is themeable, it can run on any
number of systems and scenarios. With its utilization of search logs,
it is possible to track changes in different iterations of files
easily.
If you are not familiar with vim or emacs, this one doesn't seem to have much of a learning curve.
2
Only downside to dhex imho is it cannot insert/delete bytes. Otherwise it is a very nice console hex editor.
– Nicholi
Nov 18 '16 at 0:22
When I run "dhex /path/to/big/file", I get "error opening inputfile /path/to/big/file". I like dhex and use it all the time for normal sized files.
– sondra.kinsey
Aug 17 '17 at 16:16
@sondra.kinsey : I just tried a 20GB file on my 8GB RAM machine, and didn't have a problem. This is on Ubuntu 16.04 64 bit, with dhex 0.68-2build1 (amd64). So it should work.
– mivk
Aug 18 '17 at 17:35
@mivk, I tried dhex unsuccessfully with a 44GB file using dhex_0.68-2build1_i386 on Ubuntu 17.04 with 3GB RAM. hexedit and wxHexEditor open the same file without complaint.
– sondra.kinsey
Aug 19 '17 at 14:37
@sondra.kinsey : maybe a problem/bug with the 32bit version of dhex and files over 4GB?
– mivk
Aug 19 '17 at 16:49
add a comment |
You might be able to use vi/vim as a hex editor too (it can call xxd).
Enter hex mode:
:%!xxd
Exit hex mode:
:%!xxd -r
Source: Using vi as a hex editor
1
I'd be careful with that. I've found:%!xxd
adding new characters(i.e. new line) to the file.
– Quazi Irfan
Dec 6 '16 at 3:46
1
@iamcreasy it's notxxd
who does this: rather Vim itself.
– Ruslan
Jun 5 '17 at 15:44
1
Don't forget to:set binary
! Otherwise, VIM is likely to corrupt the file by adding a line-end (CR/LF/CRLF) at the end of the file (depending on what you have the format set to (set ff=[mac/unix/dos]
)). This is highly likely to break executables and data binaries. And it does. A lot. Making sure VIM is in binary mode will prevent that from happening.
– Braden Best
Feb 3 '18 at 4:57
add a comment |
I know this is an old question, but I was dissatisfied with all of the answers here. I was looking for a hex editor that allowed for me to create my own binary files (aka insert mode) and could handle very large files.
I came across tweak, which fulfills both of these requirements, as well as the OPs.
- Tweak supports insert mode (not particularly useful if you're editing an executable file or a filesystem image, but can be extremely
handy in other file formats such as PNG).
- Cutting, copying and pasting within the file you are editing is extremely efficient. No matter how big the chunk of data you are
moving around - even if it's a 200Mb section of a CD image - Tweak
will always perform the operation effectively instantly.
- Tweak supports lazy loading of the input file: rather than sucking it all into memory straight away, it simply remembers which parts of
the editing buffer are copies of which parts of the input file and
refers to the file on disk when it needs to. Tweak only has to take
significant time when you genuinely need it to read the entire file.
The only two operations with this property are searching, and saving
the modified version of the file to disk. Everything else is instant.
add a comment |
Bless Hex Editor is a is a binary (hex) editor and currently provides the following features:
- Efficient editing of large data files and block devices.
- Multilevel undo - redo operations.
- Customizable data views.
- Fast data rendering on screen.
- Multiple tabs.
- Fast find and replace operations.
- A data conversion table.
- Advanced copy/paste capabilities.
- Highlighting of selection pattern matches in the file.
- Plugin based architecture.
- Export of data to text and html (others with plugins).
- Bitwise operations on data.
- A comprehensive user manual.
You can dounload it from here: http://packages.debian.org/sid/all/bless/download.
To install it, see How do I install a .deb file via the command line?
Need more?
- https://stackoverflow.com/questions/5498197/need-a-good-hex-editor-for-linux
10
The question is asking for a command line editor.
– psusi
Sep 12 '13 at 13:39
1
@psusi No, the OP asked about a hex editor that can be run from shell, not inside shell/terminal. It can be run from shell usingbless
command after is installed.
– Radu Rădeanu
Sep 12 '13 at 14:05
31
There is nothing you can not run from the shell; he wouldn't have mentioned it unless he meant command line.
– psusi
Sep 12 '13 at 17:50
Actually I was searching "ubuntu hex viewer" meaning window-based viewer in mind and the search site brought me here. So this answer was what I had search for.
– kinORnirvana
May 16 '18 at 16:37
add a comment |
Try hexed, it's made for use in scripts and make files.
add a comment |
This one is dead simple to use:
sudo apt-get install hexcurse
add a comment |
There is also ht
. Install it as
sudo apt-get install ht
and then run it by typing hte
.
I haven't tried it with really large files/partitions, though.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f344642%2fplease-recommend-a-hex-editor-for-shell%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
9 Answers
9
active
oldest
votes
9 Answers
9
active
oldest
votes
active
oldest
votes
active
oldest
votes
emacs
has a hexl-mode for hex editing.
4
hexl-mode isn't suitable for large files or disk partitions, since it loads the whole file into an emacs buffer. It's great for small files if you're already comfortable with emacs.
– Peter Cordes
Feb 15 '15 at 23:36
1
@PeterCordes, for editing a disk, simplydd
the region you want to edit into a file and open that in emacs, thendd
it back.
– psusi
Feb 17 '15 at 15:21
5
@psusi The problem is, I shouldn't have to go to that effort to edit a file
– Cole Johnson
Nov 11 '15 at 3:54
1
@ColeJohnson, we aren't talking about editing a file; we're talking about editing an entire raw hard disk.
– psusi
Nov 11 '15 at 23:15
2
@psusi On my Windows machine, I can use HxD and open up a disk just like any other file.
– Cole Johnson
Nov 15 '15 at 6:54
add a comment |
emacs
has a hexl-mode for hex editing.
4
hexl-mode isn't suitable for large files or disk partitions, since it loads the whole file into an emacs buffer. It's great for small files if you're already comfortable with emacs.
– Peter Cordes
Feb 15 '15 at 23:36
1
@PeterCordes, for editing a disk, simplydd
the region you want to edit into a file and open that in emacs, thendd
it back.
– psusi
Feb 17 '15 at 15:21
5
@psusi The problem is, I shouldn't have to go to that effort to edit a file
– Cole Johnson
Nov 11 '15 at 3:54
1
@ColeJohnson, we aren't talking about editing a file; we're talking about editing an entire raw hard disk.
– psusi
Nov 11 '15 at 23:15
2
@psusi On my Windows machine, I can use HxD and open up a disk just like any other file.
– Cole Johnson
Nov 15 '15 at 6:54
add a comment |
emacs
has a hexl-mode for hex editing.
emacs
has a hexl-mode for hex editing.
answered Sep 12 '13 at 13:37
psusipsusi
31.4k15090
31.4k15090
4
hexl-mode isn't suitable for large files or disk partitions, since it loads the whole file into an emacs buffer. It's great for small files if you're already comfortable with emacs.
– Peter Cordes
Feb 15 '15 at 23:36
1
@PeterCordes, for editing a disk, simplydd
the region you want to edit into a file and open that in emacs, thendd
it back.
– psusi
Feb 17 '15 at 15:21
5
@psusi The problem is, I shouldn't have to go to that effort to edit a file
– Cole Johnson
Nov 11 '15 at 3:54
1
@ColeJohnson, we aren't talking about editing a file; we're talking about editing an entire raw hard disk.
– psusi
Nov 11 '15 at 23:15
2
@psusi On my Windows machine, I can use HxD and open up a disk just like any other file.
– Cole Johnson
Nov 15 '15 at 6:54
add a comment |
4
hexl-mode isn't suitable for large files or disk partitions, since it loads the whole file into an emacs buffer. It's great for small files if you're already comfortable with emacs.
– Peter Cordes
Feb 15 '15 at 23:36
1
@PeterCordes, for editing a disk, simplydd
the region you want to edit into a file and open that in emacs, thendd
it back.
– psusi
Feb 17 '15 at 15:21
5
@psusi The problem is, I shouldn't have to go to that effort to edit a file
– Cole Johnson
Nov 11 '15 at 3:54
1
@ColeJohnson, we aren't talking about editing a file; we're talking about editing an entire raw hard disk.
– psusi
Nov 11 '15 at 23:15
2
@psusi On my Windows machine, I can use HxD and open up a disk just like any other file.
– Cole Johnson
Nov 15 '15 at 6:54
4
4
hexl-mode isn't suitable for large files or disk partitions, since it loads the whole file into an emacs buffer. It's great for small files if you're already comfortable with emacs.
– Peter Cordes
Feb 15 '15 at 23:36
hexl-mode isn't suitable for large files or disk partitions, since it loads the whole file into an emacs buffer. It's great for small files if you're already comfortable with emacs.
– Peter Cordes
Feb 15 '15 at 23:36
1
1
@PeterCordes, for editing a disk, simply
dd
the region you want to edit into a file and open that in emacs, then dd
it back.– psusi
Feb 17 '15 at 15:21
@PeterCordes, for editing a disk, simply
dd
the region you want to edit into a file and open that in emacs, then dd
it back.– psusi
Feb 17 '15 at 15:21
5
5
@psusi The problem is, I shouldn't have to go to that effort to edit a file
– Cole Johnson
Nov 11 '15 at 3:54
@psusi The problem is, I shouldn't have to go to that effort to edit a file
– Cole Johnson
Nov 11 '15 at 3:54
1
1
@ColeJohnson, we aren't talking about editing a file; we're talking about editing an entire raw hard disk.
– psusi
Nov 11 '15 at 23:15
@ColeJohnson, we aren't talking about editing a file; we're talking about editing an entire raw hard disk.
– psusi
Nov 11 '15 at 23:15
2
2
@psusi On my Windows machine, I can use HxD and open up a disk just like any other file.
– Cole Johnson
Nov 15 '15 at 6:54
@psusi On my Windows machine, I can use HxD and open up a disk just like any other file.
– Cole Johnson
Nov 15 '15 at 6:54
add a comment |
xxd
This tool is the most commonly available I have found for this type of task (available by default on both latest Ubuntu and macOS). You can remove the ascii readable part on the right if needed using -p
and you can revert (change ascii input to binary data) using the -r
function. Here are some simple example uses:
Converting to hex with ascii view:
echo example | xxd
Converting to a hexdump (no ascii view on the right):
echo example | xxd -p
Converting from a hexdump back to binary data:
echo 746573740a | xxd -p -r
You can get much more complex with this in shell scripts. I have actually used this and "dd" to scan for specific sequences and modify them in a predefined fashion all from a shell script using nothing but bash, dd
, and xxd
. You actually don't need dd for this either as you can "seek" to a specific location and write to that location the byte sequence you need. The biggest advantage to this approach is its easily scriptable.
1
xxd seems to be installed on Ubuntu 16.04 by default, which is SWEET! Thanks!
– GlenPeterson
Sep 30 '16 at 0:44
Also available by default on MacOS!
– thom_nic
Jul 12 '17 at 12:41
add a comment |
xxd
This tool is the most commonly available I have found for this type of task (available by default on both latest Ubuntu and macOS). You can remove the ascii readable part on the right if needed using -p
and you can revert (change ascii input to binary data) using the -r
function. Here are some simple example uses:
Converting to hex with ascii view:
echo example | xxd
Converting to a hexdump (no ascii view on the right):
echo example | xxd -p
Converting from a hexdump back to binary data:
echo 746573740a | xxd -p -r
You can get much more complex with this in shell scripts. I have actually used this and "dd" to scan for specific sequences and modify them in a predefined fashion all from a shell script using nothing but bash, dd
, and xxd
. You actually don't need dd for this either as you can "seek" to a specific location and write to that location the byte sequence you need. The biggest advantage to this approach is its easily scriptable.
1
xxd seems to be installed on Ubuntu 16.04 by default, which is SWEET! Thanks!
– GlenPeterson
Sep 30 '16 at 0:44
Also available by default on MacOS!
– thom_nic
Jul 12 '17 at 12:41
add a comment |
xxd
This tool is the most commonly available I have found for this type of task (available by default on both latest Ubuntu and macOS). You can remove the ascii readable part on the right if needed using -p
and you can revert (change ascii input to binary data) using the -r
function. Here are some simple example uses:
Converting to hex with ascii view:
echo example | xxd
Converting to a hexdump (no ascii view on the right):
echo example | xxd -p
Converting from a hexdump back to binary data:
echo 746573740a | xxd -p -r
You can get much more complex with this in shell scripts. I have actually used this and "dd" to scan for specific sequences and modify them in a predefined fashion all from a shell script using nothing but bash, dd
, and xxd
. You actually don't need dd for this either as you can "seek" to a specific location and write to that location the byte sequence you need. The biggest advantage to this approach is its easily scriptable.
xxd
This tool is the most commonly available I have found for this type of task (available by default on both latest Ubuntu and macOS). You can remove the ascii readable part on the right if needed using -p
and you can revert (change ascii input to binary data) using the -r
function. Here are some simple example uses:
Converting to hex with ascii view:
echo example | xxd
Converting to a hexdump (no ascii view on the right):
echo example | xxd -p
Converting from a hexdump back to binary data:
echo 746573740a | xxd -p -r
You can get much more complex with this in shell scripts. I have actually used this and "dd" to scan for specific sequences and modify them in a predefined fashion all from a shell script using nothing but bash, dd
, and xxd
. You actually don't need dd for this either as you can "seek" to a specific location and write to that location the byte sequence you need. The biggest advantage to this approach is its easily scriptable.
edited Jan 23 at 14:29
Gaurang Tandon
16611
16611
answered Jan 14 '15 at 5:44
GoblinlordGoblinlord
905177
905177
1
xxd seems to be installed on Ubuntu 16.04 by default, which is SWEET! Thanks!
– GlenPeterson
Sep 30 '16 at 0:44
Also available by default on MacOS!
– thom_nic
Jul 12 '17 at 12:41
add a comment |
1
xxd seems to be installed on Ubuntu 16.04 by default, which is SWEET! Thanks!
– GlenPeterson
Sep 30 '16 at 0:44
Also available by default on MacOS!
– thom_nic
Jul 12 '17 at 12:41
1
1
xxd seems to be installed on Ubuntu 16.04 by default, which is SWEET! Thanks!
– GlenPeterson
Sep 30 '16 at 0:44
xxd seems to be installed on Ubuntu 16.04 by default, which is SWEET! Thanks!
– GlenPeterson
Sep 30 '16 at 0:44
Also available by default on MacOS!
– thom_nic
Jul 12 '17 at 12:41
Also available by default on MacOS!
– thom_nic
Jul 12 '17 at 12:41
add a comment |
There is also DHEX
apt-cache show dhex
ncurses based hex editor with diff mode
This is more than just another hex editor: It includes a diff mode,
which can be used to easily and conveniently compare two binary files.
Since it is based on ncurses and is themeable, it can run on any
number of systems and scenarios. With its utilization of search logs,
it is possible to track changes in different iterations of files
easily.
If you are not familiar with vim or emacs, this one doesn't seem to have much of a learning curve.
2
Only downside to dhex imho is it cannot insert/delete bytes. Otherwise it is a very nice console hex editor.
– Nicholi
Nov 18 '16 at 0:22
When I run "dhex /path/to/big/file", I get "error opening inputfile /path/to/big/file". I like dhex and use it all the time for normal sized files.
– sondra.kinsey
Aug 17 '17 at 16:16
@sondra.kinsey : I just tried a 20GB file on my 8GB RAM machine, and didn't have a problem. This is on Ubuntu 16.04 64 bit, with dhex 0.68-2build1 (amd64). So it should work.
– mivk
Aug 18 '17 at 17:35
@mivk, I tried dhex unsuccessfully with a 44GB file using dhex_0.68-2build1_i386 on Ubuntu 17.04 with 3GB RAM. hexedit and wxHexEditor open the same file without complaint.
– sondra.kinsey
Aug 19 '17 at 14:37
@sondra.kinsey : maybe a problem/bug with the 32bit version of dhex and files over 4GB?
– mivk
Aug 19 '17 at 16:49
add a comment |
There is also DHEX
apt-cache show dhex
ncurses based hex editor with diff mode
This is more than just another hex editor: It includes a diff mode,
which can be used to easily and conveniently compare two binary files.
Since it is based on ncurses and is themeable, it can run on any
number of systems and scenarios. With its utilization of search logs,
it is possible to track changes in different iterations of files
easily.
If you are not familiar with vim or emacs, this one doesn't seem to have much of a learning curve.
2
Only downside to dhex imho is it cannot insert/delete bytes. Otherwise it is a very nice console hex editor.
– Nicholi
Nov 18 '16 at 0:22
When I run "dhex /path/to/big/file", I get "error opening inputfile /path/to/big/file". I like dhex and use it all the time for normal sized files.
– sondra.kinsey
Aug 17 '17 at 16:16
@sondra.kinsey : I just tried a 20GB file on my 8GB RAM machine, and didn't have a problem. This is on Ubuntu 16.04 64 bit, with dhex 0.68-2build1 (amd64). So it should work.
– mivk
Aug 18 '17 at 17:35
@mivk, I tried dhex unsuccessfully with a 44GB file using dhex_0.68-2build1_i386 on Ubuntu 17.04 with 3GB RAM. hexedit and wxHexEditor open the same file without complaint.
– sondra.kinsey
Aug 19 '17 at 14:37
@sondra.kinsey : maybe a problem/bug with the 32bit version of dhex and files over 4GB?
– mivk
Aug 19 '17 at 16:49
add a comment |
There is also DHEX
apt-cache show dhex
ncurses based hex editor with diff mode
This is more than just another hex editor: It includes a diff mode,
which can be used to easily and conveniently compare two binary files.
Since it is based on ncurses and is themeable, it can run on any
number of systems and scenarios. With its utilization of search logs,
it is possible to track changes in different iterations of files
easily.
If you are not familiar with vim or emacs, this one doesn't seem to have much of a learning curve.
There is also DHEX
apt-cache show dhex
ncurses based hex editor with diff mode
This is more than just another hex editor: It includes a diff mode,
which can be used to easily and conveniently compare two binary files.
Since it is based on ncurses and is themeable, it can run on any
number of systems and scenarios. With its utilization of search logs,
it is possible to track changes in different iterations of files
easily.
If you are not familiar with vim or emacs, this one doesn't seem to have much of a learning curve.
answered Jun 2 '14 at 16:32
mivkmivk
2,3332434
2,3332434
2
Only downside to dhex imho is it cannot insert/delete bytes. Otherwise it is a very nice console hex editor.
– Nicholi
Nov 18 '16 at 0:22
When I run "dhex /path/to/big/file", I get "error opening inputfile /path/to/big/file". I like dhex and use it all the time for normal sized files.
– sondra.kinsey
Aug 17 '17 at 16:16
@sondra.kinsey : I just tried a 20GB file on my 8GB RAM machine, and didn't have a problem. This is on Ubuntu 16.04 64 bit, with dhex 0.68-2build1 (amd64). So it should work.
– mivk
Aug 18 '17 at 17:35
@mivk, I tried dhex unsuccessfully with a 44GB file using dhex_0.68-2build1_i386 on Ubuntu 17.04 with 3GB RAM. hexedit and wxHexEditor open the same file without complaint.
– sondra.kinsey
Aug 19 '17 at 14:37
@sondra.kinsey : maybe a problem/bug with the 32bit version of dhex and files over 4GB?
– mivk
Aug 19 '17 at 16:49
add a comment |
2
Only downside to dhex imho is it cannot insert/delete bytes. Otherwise it is a very nice console hex editor.
– Nicholi
Nov 18 '16 at 0:22
When I run "dhex /path/to/big/file", I get "error opening inputfile /path/to/big/file". I like dhex and use it all the time for normal sized files.
– sondra.kinsey
Aug 17 '17 at 16:16
@sondra.kinsey : I just tried a 20GB file on my 8GB RAM machine, and didn't have a problem. This is on Ubuntu 16.04 64 bit, with dhex 0.68-2build1 (amd64). So it should work.
– mivk
Aug 18 '17 at 17:35
@mivk, I tried dhex unsuccessfully with a 44GB file using dhex_0.68-2build1_i386 on Ubuntu 17.04 with 3GB RAM. hexedit and wxHexEditor open the same file without complaint.
– sondra.kinsey
Aug 19 '17 at 14:37
@sondra.kinsey : maybe a problem/bug with the 32bit version of dhex and files over 4GB?
– mivk
Aug 19 '17 at 16:49
2
2
Only downside to dhex imho is it cannot insert/delete bytes. Otherwise it is a very nice console hex editor.
– Nicholi
Nov 18 '16 at 0:22
Only downside to dhex imho is it cannot insert/delete bytes. Otherwise it is a very nice console hex editor.
– Nicholi
Nov 18 '16 at 0:22
When I run "dhex /path/to/big/file", I get "error opening inputfile /path/to/big/file". I like dhex and use it all the time for normal sized files.
– sondra.kinsey
Aug 17 '17 at 16:16
When I run "dhex /path/to/big/file", I get "error opening inputfile /path/to/big/file". I like dhex and use it all the time for normal sized files.
– sondra.kinsey
Aug 17 '17 at 16:16
@sondra.kinsey : I just tried a 20GB file on my 8GB RAM machine, and didn't have a problem. This is on Ubuntu 16.04 64 bit, with dhex 0.68-2build1 (amd64). So it should work.
– mivk
Aug 18 '17 at 17:35
@sondra.kinsey : I just tried a 20GB file on my 8GB RAM machine, and didn't have a problem. This is on Ubuntu 16.04 64 bit, with dhex 0.68-2build1 (amd64). So it should work.
– mivk
Aug 18 '17 at 17:35
@mivk, I tried dhex unsuccessfully with a 44GB file using dhex_0.68-2build1_i386 on Ubuntu 17.04 with 3GB RAM. hexedit and wxHexEditor open the same file without complaint.
– sondra.kinsey
Aug 19 '17 at 14:37
@mivk, I tried dhex unsuccessfully with a 44GB file using dhex_0.68-2build1_i386 on Ubuntu 17.04 with 3GB RAM. hexedit and wxHexEditor open the same file without complaint.
– sondra.kinsey
Aug 19 '17 at 14:37
@sondra.kinsey : maybe a problem/bug with the 32bit version of dhex and files over 4GB?
– mivk
Aug 19 '17 at 16:49
@sondra.kinsey : maybe a problem/bug with the 32bit version of dhex and files over 4GB?
– mivk
Aug 19 '17 at 16:49
add a comment |
You might be able to use vi/vim as a hex editor too (it can call xxd).
Enter hex mode:
:%!xxd
Exit hex mode:
:%!xxd -r
Source: Using vi as a hex editor
1
I'd be careful with that. I've found:%!xxd
adding new characters(i.e. new line) to the file.
– Quazi Irfan
Dec 6 '16 at 3:46
1
@iamcreasy it's notxxd
who does this: rather Vim itself.
– Ruslan
Jun 5 '17 at 15:44
1
Don't forget to:set binary
! Otherwise, VIM is likely to corrupt the file by adding a line-end (CR/LF/CRLF) at the end of the file (depending on what you have the format set to (set ff=[mac/unix/dos]
)). This is highly likely to break executables and data binaries. And it does. A lot. Making sure VIM is in binary mode will prevent that from happening.
– Braden Best
Feb 3 '18 at 4:57
add a comment |
You might be able to use vi/vim as a hex editor too (it can call xxd).
Enter hex mode:
:%!xxd
Exit hex mode:
:%!xxd -r
Source: Using vi as a hex editor
1
I'd be careful with that. I've found:%!xxd
adding new characters(i.e. new line) to the file.
– Quazi Irfan
Dec 6 '16 at 3:46
1
@iamcreasy it's notxxd
who does this: rather Vim itself.
– Ruslan
Jun 5 '17 at 15:44
1
Don't forget to:set binary
! Otherwise, VIM is likely to corrupt the file by adding a line-end (CR/LF/CRLF) at the end of the file (depending on what you have the format set to (set ff=[mac/unix/dos]
)). This is highly likely to break executables and data binaries. And it does. A lot. Making sure VIM is in binary mode will prevent that from happening.
– Braden Best
Feb 3 '18 at 4:57
add a comment |
You might be able to use vi/vim as a hex editor too (it can call xxd).
Enter hex mode:
:%!xxd
Exit hex mode:
:%!xxd -r
Source: Using vi as a hex editor
You might be able to use vi/vim as a hex editor too (it can call xxd).
Enter hex mode:
:%!xxd
Exit hex mode:
:%!xxd -r
Source: Using vi as a hex editor
edited Oct 18 '16 at 14:42
friederbluemle
410510
410510
answered Sep 12 '13 at 14:37
klcantklcant
35926
35926
1
I'd be careful with that. I've found:%!xxd
adding new characters(i.e. new line) to the file.
– Quazi Irfan
Dec 6 '16 at 3:46
1
@iamcreasy it's notxxd
who does this: rather Vim itself.
– Ruslan
Jun 5 '17 at 15:44
1
Don't forget to:set binary
! Otherwise, VIM is likely to corrupt the file by adding a line-end (CR/LF/CRLF) at the end of the file (depending on what you have the format set to (set ff=[mac/unix/dos]
)). This is highly likely to break executables and data binaries. And it does. A lot. Making sure VIM is in binary mode will prevent that from happening.
– Braden Best
Feb 3 '18 at 4:57
add a comment |
1
I'd be careful with that. I've found:%!xxd
adding new characters(i.e. new line) to the file.
– Quazi Irfan
Dec 6 '16 at 3:46
1
@iamcreasy it's notxxd
who does this: rather Vim itself.
– Ruslan
Jun 5 '17 at 15:44
1
Don't forget to:set binary
! Otherwise, VIM is likely to corrupt the file by adding a line-end (CR/LF/CRLF) at the end of the file (depending on what you have the format set to (set ff=[mac/unix/dos]
)). This is highly likely to break executables and data binaries. And it does. A lot. Making sure VIM is in binary mode will prevent that from happening.
– Braden Best
Feb 3 '18 at 4:57
1
1
I'd be careful with that. I've found
:%!xxd
adding new characters(i.e. new line) to the file.– Quazi Irfan
Dec 6 '16 at 3:46
I'd be careful with that. I've found
:%!xxd
adding new characters(i.e. new line) to the file.– Quazi Irfan
Dec 6 '16 at 3:46
1
1
@iamcreasy it's not
xxd
who does this: rather Vim itself.– Ruslan
Jun 5 '17 at 15:44
@iamcreasy it's not
xxd
who does this: rather Vim itself.– Ruslan
Jun 5 '17 at 15:44
1
1
Don't forget to
:set binary
! Otherwise, VIM is likely to corrupt the file by adding a line-end (CR/LF/CRLF) at the end of the file (depending on what you have the format set to (set ff=[mac/unix/dos]
)). This is highly likely to break executables and data binaries. And it does. A lot. Making sure VIM is in binary mode will prevent that from happening.– Braden Best
Feb 3 '18 at 4:57
Don't forget to
:set binary
! Otherwise, VIM is likely to corrupt the file by adding a line-end (CR/LF/CRLF) at the end of the file (depending on what you have the format set to (set ff=[mac/unix/dos]
)). This is highly likely to break executables and data binaries. And it does. A lot. Making sure VIM is in binary mode will prevent that from happening.– Braden Best
Feb 3 '18 at 4:57
add a comment |
I know this is an old question, but I was dissatisfied with all of the answers here. I was looking for a hex editor that allowed for me to create my own binary files (aka insert mode) and could handle very large files.
I came across tweak, which fulfills both of these requirements, as well as the OPs.
- Tweak supports insert mode (not particularly useful if you're editing an executable file or a filesystem image, but can be extremely
handy in other file formats such as PNG).
- Cutting, copying and pasting within the file you are editing is extremely efficient. No matter how big the chunk of data you are
moving around - even if it's a 200Mb section of a CD image - Tweak
will always perform the operation effectively instantly.
- Tweak supports lazy loading of the input file: rather than sucking it all into memory straight away, it simply remembers which parts of
the editing buffer are copies of which parts of the input file and
refers to the file on disk when it needs to. Tweak only has to take
significant time when you genuinely need it to read the entire file.
The only two operations with this property are searching, and saving
the modified version of the file to disk. Everything else is instant.
add a comment |
I know this is an old question, but I was dissatisfied with all of the answers here. I was looking for a hex editor that allowed for me to create my own binary files (aka insert mode) and could handle very large files.
I came across tweak, which fulfills both of these requirements, as well as the OPs.
- Tweak supports insert mode (not particularly useful if you're editing an executable file or a filesystem image, but can be extremely
handy in other file formats such as PNG).
- Cutting, copying and pasting within the file you are editing is extremely efficient. No matter how big the chunk of data you are
moving around - even if it's a 200Mb section of a CD image - Tweak
will always perform the operation effectively instantly.
- Tweak supports lazy loading of the input file: rather than sucking it all into memory straight away, it simply remembers which parts of
the editing buffer are copies of which parts of the input file and
refers to the file on disk when it needs to. Tweak only has to take
significant time when you genuinely need it to read the entire file.
The only two operations with this property are searching, and saving
the modified version of the file to disk. Everything else is instant.
add a comment |
I know this is an old question, but I was dissatisfied with all of the answers here. I was looking for a hex editor that allowed for me to create my own binary files (aka insert mode) and could handle very large files.
I came across tweak, which fulfills both of these requirements, as well as the OPs.
- Tweak supports insert mode (not particularly useful if you're editing an executable file or a filesystem image, but can be extremely
handy in other file formats such as PNG).
- Cutting, copying and pasting within the file you are editing is extremely efficient. No matter how big the chunk of data you are
moving around - even if it's a 200Mb section of a CD image - Tweak
will always perform the operation effectively instantly.
- Tweak supports lazy loading of the input file: rather than sucking it all into memory straight away, it simply remembers which parts of
the editing buffer are copies of which parts of the input file and
refers to the file on disk when it needs to. Tweak only has to take
significant time when you genuinely need it to read the entire file.
The only two operations with this property are searching, and saving
the modified version of the file to disk. Everything else is instant.
I know this is an old question, but I was dissatisfied with all of the answers here. I was looking for a hex editor that allowed for me to create my own binary files (aka insert mode) and could handle very large files.
I came across tweak, which fulfills both of these requirements, as well as the OPs.
- Tweak supports insert mode (not particularly useful if you're editing an executable file or a filesystem image, but can be extremely
handy in other file formats such as PNG).
- Cutting, copying and pasting within the file you are editing is extremely efficient. No matter how big the chunk of data you are
moving around - even if it's a 200Mb section of a CD image - Tweak
will always perform the operation effectively instantly.
- Tweak supports lazy loading of the input file: rather than sucking it all into memory straight away, it simply remembers which parts of
the editing buffer are copies of which parts of the input file and
refers to the file on disk when it needs to. Tweak only has to take
significant time when you genuinely need it to read the entire file.
The only two operations with this property are searching, and saving
the modified version of the file to disk. Everything else is instant.
answered Oct 3 '17 at 20:38
Gogeta70Gogeta70
17112
17112
add a comment |
add a comment |
Bless Hex Editor is a is a binary (hex) editor and currently provides the following features:
- Efficient editing of large data files and block devices.
- Multilevel undo - redo operations.
- Customizable data views.
- Fast data rendering on screen.
- Multiple tabs.
- Fast find and replace operations.
- A data conversion table.
- Advanced copy/paste capabilities.
- Highlighting of selection pattern matches in the file.
- Plugin based architecture.
- Export of data to text and html (others with plugins).
- Bitwise operations on data.
- A comprehensive user manual.
You can dounload it from here: http://packages.debian.org/sid/all/bless/download.
To install it, see How do I install a .deb file via the command line?
Need more?
- https://stackoverflow.com/questions/5498197/need-a-good-hex-editor-for-linux
10
The question is asking for a command line editor.
– psusi
Sep 12 '13 at 13:39
1
@psusi No, the OP asked about a hex editor that can be run from shell, not inside shell/terminal. It can be run from shell usingbless
command after is installed.
– Radu Rădeanu
Sep 12 '13 at 14:05
31
There is nothing you can not run from the shell; he wouldn't have mentioned it unless he meant command line.
– psusi
Sep 12 '13 at 17:50
Actually I was searching "ubuntu hex viewer" meaning window-based viewer in mind and the search site brought me here. So this answer was what I had search for.
– kinORnirvana
May 16 '18 at 16:37
add a comment |
Bless Hex Editor is a is a binary (hex) editor and currently provides the following features:
- Efficient editing of large data files and block devices.
- Multilevel undo - redo operations.
- Customizable data views.
- Fast data rendering on screen.
- Multiple tabs.
- Fast find and replace operations.
- A data conversion table.
- Advanced copy/paste capabilities.
- Highlighting of selection pattern matches in the file.
- Plugin based architecture.
- Export of data to text and html (others with plugins).
- Bitwise operations on data.
- A comprehensive user manual.
You can dounload it from here: http://packages.debian.org/sid/all/bless/download.
To install it, see How do I install a .deb file via the command line?
Need more?
- https://stackoverflow.com/questions/5498197/need-a-good-hex-editor-for-linux
10
The question is asking for a command line editor.
– psusi
Sep 12 '13 at 13:39
1
@psusi No, the OP asked about a hex editor that can be run from shell, not inside shell/terminal. It can be run from shell usingbless
command after is installed.
– Radu Rădeanu
Sep 12 '13 at 14:05
31
There is nothing you can not run from the shell; he wouldn't have mentioned it unless he meant command line.
– psusi
Sep 12 '13 at 17:50
Actually I was searching "ubuntu hex viewer" meaning window-based viewer in mind and the search site brought me here. So this answer was what I had search for.
– kinORnirvana
May 16 '18 at 16:37
add a comment |
Bless Hex Editor is a is a binary (hex) editor and currently provides the following features:
- Efficient editing of large data files and block devices.
- Multilevel undo - redo operations.
- Customizable data views.
- Fast data rendering on screen.
- Multiple tabs.
- Fast find and replace operations.
- A data conversion table.
- Advanced copy/paste capabilities.
- Highlighting of selection pattern matches in the file.
- Plugin based architecture.
- Export of data to text and html (others with plugins).
- Bitwise operations on data.
- A comprehensive user manual.
You can dounload it from here: http://packages.debian.org/sid/all/bless/download.
To install it, see How do I install a .deb file via the command line?
Need more?
- https://stackoverflow.com/questions/5498197/need-a-good-hex-editor-for-linux
Bless Hex Editor is a is a binary (hex) editor and currently provides the following features:
- Efficient editing of large data files and block devices.
- Multilevel undo - redo operations.
- Customizable data views.
- Fast data rendering on screen.
- Multiple tabs.
- Fast find and replace operations.
- A data conversion table.
- Advanced copy/paste capabilities.
- Highlighting of selection pattern matches in the file.
- Plugin based architecture.
- Export of data to text and html (others with plugins).
- Bitwise operations on data.
- A comprehensive user manual.
You can dounload it from here: http://packages.debian.org/sid/all/bless/download.
To install it, see How do I install a .deb file via the command line?
Need more?
- https://stackoverflow.com/questions/5498197/need-a-good-hex-editor-for-linux
edited May 23 '17 at 12:39
Community♦
1
1
answered Sep 12 '13 at 12:17
Radu RădeanuRadu Rădeanu
119k35251326
119k35251326
10
The question is asking for a command line editor.
– psusi
Sep 12 '13 at 13:39
1
@psusi No, the OP asked about a hex editor that can be run from shell, not inside shell/terminal. It can be run from shell usingbless
command after is installed.
– Radu Rădeanu
Sep 12 '13 at 14:05
31
There is nothing you can not run from the shell; he wouldn't have mentioned it unless he meant command line.
– psusi
Sep 12 '13 at 17:50
Actually I was searching "ubuntu hex viewer" meaning window-based viewer in mind and the search site brought me here. So this answer was what I had search for.
– kinORnirvana
May 16 '18 at 16:37
add a comment |
10
The question is asking for a command line editor.
– psusi
Sep 12 '13 at 13:39
1
@psusi No, the OP asked about a hex editor that can be run from shell, not inside shell/terminal. It can be run from shell usingbless
command after is installed.
– Radu Rădeanu
Sep 12 '13 at 14:05
31
There is nothing you can not run from the shell; he wouldn't have mentioned it unless he meant command line.
– psusi
Sep 12 '13 at 17:50
Actually I was searching "ubuntu hex viewer" meaning window-based viewer in mind and the search site brought me here. So this answer was what I had search for.
– kinORnirvana
May 16 '18 at 16:37
10
10
The question is asking for a command line editor.
– psusi
Sep 12 '13 at 13:39
The question is asking for a command line editor.
– psusi
Sep 12 '13 at 13:39
1
1
@psusi No, the OP asked about a hex editor that can be run from shell, not inside shell/terminal. It can be run from shell using
bless
command after is installed.– Radu Rădeanu
Sep 12 '13 at 14:05
@psusi No, the OP asked about a hex editor that can be run from shell, not inside shell/terminal. It can be run from shell using
bless
command after is installed.– Radu Rădeanu
Sep 12 '13 at 14:05
31
31
There is nothing you can not run from the shell; he wouldn't have mentioned it unless he meant command line.
– psusi
Sep 12 '13 at 17:50
There is nothing you can not run from the shell; he wouldn't have mentioned it unless he meant command line.
– psusi
Sep 12 '13 at 17:50
Actually I was searching "ubuntu hex viewer" meaning window-based viewer in mind and the search site brought me here. So this answer was what I had search for.
– kinORnirvana
May 16 '18 at 16:37
Actually I was searching "ubuntu hex viewer" meaning window-based viewer in mind and the search site brought me here. So this answer was what I had search for.
– kinORnirvana
May 16 '18 at 16:37
add a comment |
Try hexed, it's made for use in scripts and make files.
add a comment |
Try hexed, it's made for use in scripts and make files.
add a comment |
Try hexed, it's made for use in scripts and make files.
Try hexed, it's made for use in scripts and make files.
answered Jan 6 '15 at 22:01
b.zaarb.zaar
211
211
add a comment |
add a comment |
This one is dead simple to use:
sudo apt-get install hexcurse
add a comment |
This one is dead simple to use:
sudo apt-get install hexcurse
add a comment |
This one is dead simple to use:
sudo apt-get install hexcurse
This one is dead simple to use:
sudo apt-get install hexcurse
answered Aug 17 '17 at 4:28
HenryRootTwoHenryRootTwo
1213
1213
add a comment |
add a comment |
There is also ht
. Install it as
sudo apt-get install ht
and then run it by typing hte
.
I haven't tried it with really large files/partitions, though.
add a comment |
There is also ht
. Install it as
sudo apt-get install ht
and then run it by typing hte
.
I haven't tried it with really large files/partitions, though.
add a comment |
There is also ht
. Install it as
sudo apt-get install ht
and then run it by typing hte
.
I haven't tried it with really large files/partitions, though.
There is also ht
. Install it as
sudo apt-get install ht
and then run it by typing hte
.
I haven't tried it with really large files/partitions, though.
answered Aug 21 '17 at 17:36
fjfloresfjflores
213
213
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f344642%2fplease-recommend-a-hex-editor-for-shell%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
I think you can do it using vim
– Deepal
Sep 12 '13 at 13:00
stackoverflow.com/questions/5498197/…
– Ciro Santilli 新疆改造中心 六四事件 法轮功
May 22 '15 at 15:39