{
    "content": [
        {
            "type": "text",
            "text": "# HEXEDIT (man)\n\n## NAME\n\nhexedit - view and edit files in hexadecimal or in ASCII\n\n## SYNOPSIS\n\nhexedit [-s | --sector] [-m | --maximize] [-l<n> | --linelength <n>] [-h | --help] [filename]\n\n## DESCRIPTION\n\nhexedit  shows  a file both in ASCII and in hexadecimal. The file can be a device as the file\nis read a piece at a time. You can modify the file and search through it.\n\n## TLDR\n\n> File editor for hexadecimal and ASCII content.\n\n- Open file:\n  `hexedit {{path/to/file}}`\n- Display file with sectors:\n  `hexedit {{-s|--sector}} {{path/to/file}}`\n- Maximize file display:\n  `hexedit {{-m|--maximize}} {{path/to/file}}`\n- Display help:\n  `hexedit {{-h|--help}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (10 subsections)\n- **SEE ALSO**\n- **AUTHOR**\n- **UNRESTRICTIONS**\n- **TODO**\n- **LIMITATIONS**\n- **BUGS**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "HEXEDIT",
        "section": "",
        "mode": "man",
        "summary": "hexedit - view and edit files in hexadecimal or in ASCII",
        "synopsis": "hexedit [-s | --sector] [-m | --maximize] [-l<n> | --linelength <n>] [-h | --help] [filename]",
        "tldr_summary": "File editor for hexadecimal and ASCII content.",
        "tldr_examples": [
            {
                "description": "Open file",
                "command": "hexedit {{path/to/file}}"
            },
            {
                "description": "Display file with sectors",
                "command": "hexedit {{-s|--sector}} {{path/to/file}}"
            },
            {
                "description": "Maximize file display",
                "command": "hexedit {{-m|--maximize}} {{path/to/file}}"
            },
            {
                "description": "Display help",
                "command": "hexedit {{-h|--help}}"
            }
        ],
        "tldr_source": "official",
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "od",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/od/1/json"
            },
            {
                "name": "hdump",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/hdump/1/json"
            },
            {
                "name": "hexdump",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/hexdump/1/json"
            },
            {
                "name": "bpe",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/bpe/1/json"
            },
            {
                "name": "hexed",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/hexed/1/json"
            },
            {
                "name": "beav",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/beav/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 15,
                "subsections": [
                    {
                        "name": "COMMANDS (quickly)",
                        "lines": 1
                    },
                    {
                        "name": "Moving",
                        "lines": 10
                    },
                    {
                        "name": "Miscellaneous",
                        "lines": 15
                    },
                    {
                        "name": "Cut&Paste",
                        "lines": 6
                    },
                    {
                        "name": "COMMANDS (full and detailed)",
                        "lines": 41
                    },
                    {
                        "name": "Modeline",
                        "lines": 7
                    },
                    {
                        "name": "Editing",
                        "lines": 13
                    },
                    {
                        "name": "Searching",
                        "lines": 15
                    },
                    {
                        "name": "Selecting, copying, pasting, filling",
                        "lines": 16
                    },
                    {
                        "name": "Scrolling",
                        "lines": 4
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "UNRESTRICTIONS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "TODO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "LIMITATIONS",
                "lines": 14,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 9,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "hexedit - view and edit files in hexadecimal or in ASCII\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "hexedit [-s | --sector] [-m | --maximize] [-l<n> | --linelength <n>] [-h | --help] [filename]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "hexedit  shows  a file both in ASCII and in hexadecimal. The file can be a device as the file\nis read a piece at a time. You can modify the file and search through it.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "-s, --sector\nFormat the display to have entire sectors.\n\n-m, --maximize\nTry to maximize the display.\n\n--color\nDisplay colors.  This feature is only available if your operating system supports it.\n\n-l<n>, --linelength <n>\nExplicitly set the number of bytes to display per line to <n>.\n\n-h, --help\nShow the usage.\n",
                "subsections": [
                    {
                        "name": "COMMANDS (quickly)",
                        "content": ""
                    },
                    {
                        "name": "Moving",
                        "content": "<, > :  go to start/end of the file\nRight:  next character\nLeft:   previous character\nDown:   next line\nUp:     previous line\nHome:   beginning of line\nEnd:    end of line\nPUp:    page forward\nPDown:  page backward\n"
                    },
                    {
                        "name": "Miscellaneous",
                        "content": "F2:     save\nF3:     load file\nF1:     help\nCtrl-L: redraw\nCtrl-Z: suspend\nCtrl-X: save and exit\nCtrl-C: exit without saving\n\nTab:    toggle hex/ascii\nReturn: go to\nBackspace: undo previous character\nCtrl-U: undo all\nCtrl-S: search forward\nCtrl-R: search backward\n"
                    },
                    {
                        "name": "Cut&Paste",
                        "content": "Ctrl-Space: set mark\nEsc-W:  copy\nCtrl-Y: paste\nEsc-Y:  paste into a file\nEsc-I:  fill\n"
                    },
                    {
                        "name": "COMMANDS (full and detailed)",
                        "content": "o Right-Arrow, Left-Arrow, Down-Arrow, Up-Arrow - move the cursor.\no Ctrl+F, Ctrl+B, Ctrl+N, Ctrl+P - move the cursor.\no Ctrl+Right-Arrow, Ctrl+Left-Arrow, Ctrl+Down-Arrow, Ctrl+Up-Arrow - move n times  the  cur‐\nsor.\no Esc+Right-Arrow, Esc+Left-Arrow, Esc+Down-Arrow, Esc+Up-Arrow - move n times the cursor.\no Esc+F, Esc+B, Esc+N, Esc+P - move n times the cursor.\no Home, Ctrl+A - go the beginning of the line.\no End, Ctrl+E - go to the end of the line.\no Page up, Esc+V, F5 - go up in the file by one page.\no Page down, Ctrl+V, F6 - go down in the file by one page.\no <, Esc+<, Esc+Home - go to the beginning of the file.\no >, Esc+>, Esc+End - go to the end of the file (for regular files that have a size).\no Ctrl+Z - suspend hexedit.\no Ctrl+U, Ctrl+, Ctrl+/ - undo all (forget the modifications).\no  Ctrl+Q  -  read  next  input character and insert it (this is useful for inserting control\ncharacters and bound keys).\no Tab, Ctrl+T - toggle between ASCII and hexadecimal.\no /, Ctrl+S - search forward (in ASCII or in hexadecimal, use TAB to change).\no Ctrl+R - search backward.\no Ctrl+G, F4 - go to a position in the file.\no Return - go to a sector in the file if --sector is used, otherwise go to a position in  the\nfile.\no Esc+L - display the page starting at the current cursor position.\no F2, Ctrl+W - save the modifications.\no F1, Esc+H - help (show the man page).\no Ctrl+O, F3 - open another file\no Ctrl+L - redisplay (refresh) the display (useful when your terminal screws up).\no Backspace, Ctrl+H - undo the modifications made on the previous byte.\no Esc+Ctrl+H - undo the modifications made on the previous bytes.\no Ctrl+Space, F9 - set mark where cursor is.\no Esc+W, Delete, F7 - copy selected region.\no Ctrl+Y, Insert, F8 - paste (yank) previously copied region.\no Esc+Y, F11 - save previously copied region to a file.\no Esc+I, F12 - fill the selection with a string\no Esc+T - truncate the file at the current location\no Ctrl+C - unconditional quit (without saving).\no F10, Ctrl+X - quit.\n\nFor  the Esc commands, it sometimes works to use Alt instead of Esc. Funny things here (espe‐\ncially for froggies :) egrave = Alt+H , ccedilla = Alt+G, Alt+Y = ugrave.\n"
                    },
                    {
                        "name": "Modeline",
                        "content": "At the bottom of the display you have the modeline (copied from emacs). As in emacs, you have\nthe  indications  --,  and %% meaning unmodified, modified and read-only. Then you have the\nname of the file you're currently editing. Next to it is the current position of  the  cursor\nin  the file followed by the total file size. The total file size isn't quite correct for de‐\nvices.\nWhile in --sector mode, it shows the sector the cursor is in.\n"
                    },
                    {
                        "name": "Editing",
                        "content": "You can edit in ASCII or in hexadecimal. You can switch between the two with  Tab.  When  the\nfile  is  read-only, you can't edit it. When trying to edit a read-only file, a message \"File\nis read-only\" tells you it is non-writable.\nThe modifications are shown in bold until they are saved.  The modeline indicates whether you\nhave modified the file or not.\nWhen  editing  in hexadecimal, only 0,1,...,9, a,b,...,f, A,B,...F are legal.  Other keys are\nunbound. The first time you hit an unbound key, the help pops up.  It won't pop again  unless\nyou call the help directly (with F1).\nWhen  editing  in ascii, you can find it difficult to enter characters like / which are bound\nto a function. The solution is to use the quoted insert function Ctrl+Q, the  key  after  the\nquoted  insert function is not processed by hexedit (like emacs' quoted-insert, or like the \\\ncharacter in C).\n"
                    },
                    {
                        "name": "Searching",
                        "content": "You can search for a string in ASCII or in hexadecimal. You can switch between the  two  with\nTab.  If  the string is found, the cursor is moved to the beginning of the matching location.\nIf the search failed, a message \"not found\" tells you so. You can cancel the search by press‐\ning a key.\nThe search in hexadecimal is a bit confusing. You must give a hexadecimal string with an even\nnumber of characters. The search can then be done byte by byte. If you want to search a  long\nnumber  (eg: a 32 bit number), you must know the internal representation of that number (lit‐\ntle/big endian problem) and give it the way it is in memory. For example, on an Intel proces‐\nsor  (little  endian),  you must swap every bytes: 0x12345678 is written 0x78563412 in memory\nand that's the string you must give to the search engine.\nBefore searching you are asked if you want to save the changes, if the file is edited.\n\nFor  more  sophisticated  search,  see   Volker   Schatz's   patch   at   <http://www.volker‐\nschatz.com/unix/homebrew.html#hexedit>.\n"
                    },
                    {
                        "name": "Selecting, copying, pasting, filling",
                        "content": "First, select the part of the buffer you want to copy: start setting the mark where you want.\nThen go to the end of the area you want to copy (you can use  the  go  to  function  and  the\nsearch functions). Then copy it. You can then paste the copied area in the current file or in\nanother file.\n\nYou can also fill the selected area with a string or a character: start  choosing  the  block\nyou  want to fill in (set mark then move to the end of the block), and call the fill function\n(F12). hexedit ask you the string you want to fill the block with.\nThe code is not tuned for huge filling as it keeps the modifications in memory until you save\nthem. That's why hexedit will warn you if you try to fill in a big block.\n\nWhen the mark is set, the selection is shown in reverse mode.\nBe aware that the copied area contains the modifications done at the time of the copy. But if\nyou undo the modifications, it does not change the content of the copy buffer. It seems obvi‐\nous but it's worth saying.\n"
                    },
                    {
                        "name": "Scrolling",
                        "content": "The  scrolling  is  different  whether  you  are in --sector mode or not. In normal mode, the\nscrolling is line by line. In sector mode, the scrolling is sector by sector. In both  modes,\nyou can force the display to start at a given position using Esc+L.\n"
                    }
                ]
            },
            "SEE ALSO": {
                "content": "od(1), hdump(1), hexdump(1), bpe(1), hexed(1), beav(1).\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Pixel (Pascal Rigaux) <pixel@rigaux.org>,\nHome page is <http://rigaux.org/>.\n",
                "subsections": []
            },
            "UNRESTRICTIONS": {
                "content": "hexedit  is  Open Source; anyone may redistribute copies of hexedit to anyone under the terms\nstated in the GNU General Public License.\n\nYou can find hexedit at\n<https://github.com/pixel/hexedit/archive/1.5.tar.gz>\n",
                "subsections": []
            },
            "TODO": {
                "content": "Anything you think could be nice...\n",
                "subsections": []
            },
            "LIMITATIONS": {
                "content": "There are problems with the curses library given with Redhat 5.0 that make hexedit think  the\nterminal is huge. The result is that hexedit is not usable.\n\nThe  shortcuts  work on some machines, and not on others. That's why there are many shortcuts\nfor each function. The Ctrl+Arrows and the Alt+. do not work work as they should most of  the\ntime.  On  SUNs, you must do Ctrl+V-Ctrl+V instead of Ctrl+V (!); and the Alt key is the dia‐\nmond one.\n\nWhile searching, it could be interesting to know which position the search has reached.  It's\nalways nice to see something moving to help waiting.\n\nThe hexadecimal search could be able to search modulo 4 bits instead of 8 bits.  Another fea‐\nture could be to complete padd odd length hexadecimal searches with zeros.\n",
                "subsections": []
            },
            "BUGS": {
                "content": "I have an example where the display is completely screwed up. It seems to be a bug in ncurses\n(or  maybe  in xterm and rxvt)?? Don't know if it's me using ncurses badly or not... It seems\nto happen when hexedit leaves only one space at the end of the lines... If anyone has  a  (or\nthe) solution, please tell me!\n\nIf  you  have any problem with the program (even a small one), please do report it to me. Re‐\nmarks of any kind are also welcome.\n\n12 July 1998                                  HEXEDIT(1)",
                "subsections": []
            }
        }
    }
}