https://github.com/xfgusta/xdump
Display file contents in hexadecimal and ASCII
https://github.com/xfgusta/xdump
ascii c cli command-line-tool hex hexadecimal hexdump linux
Last synced: 5 months ago
JSON representation
Display file contents in hexadecimal and ASCII
- Host: GitHub
- URL: https://github.com/xfgusta/xdump
- Owner: xfgusta
- License: mit
- Created: 2021-09-18T19:54:37.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-03T14:24:01.000Z (almost 3 years ago)
- Last Synced: 2023-03-08T05:00:49.019Z (over 2 years ago)
- Topics: ascii, c, cli, command-line-tool, hex, hexadecimal, hexdump, linux
- Language: C
- Homepage:
- Size: 93.8 KB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# xdump
The **xdump** utility is a filter which displays the specified file, or standard input if no file is specified, in hexadecimal and ASCII format. It uses a colored output to distinguish different categories of bytes.
The categories of bytes are:
+ NULL bytes
+ printable ASCII characters
+ ASCII whitespace characters
+ other ASCII characters
+ non-ASCIIThe colors can be changed with the `XDUMP_COLORS` environment variable. Its value is a semicolon-separated list that defaults to `off=7;bar=7;nul=238;print=7;space=227;ascii=111;nonascii=204`. The color must be a valid [8-bit color](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) code.
When the [`NO_COLOR` environment variable](https://no-color.org) is present or when the standard output isn't connected to a terminal, the colored output is disabled.
## Installation
### Arch Linux
[**xdump**](https://aur.archlinux.org/packages/xdump) package from AUR
```text
git clone https://aur.archlinux.org/xdump.git
cd xdump
makepkg -si
```### Fedora Linux
[**xdump**](https://copr.fedorainfracloud.org/coprs/xfgusta/xdump/) package from Copr
```text
dnf copr enable xfgusta/xdump
dnf install xdump
```### From source
The install directory defaults to `/usr/local`:
```text
make install
```You can install **xdump** in a different directory using the `PREFIX` variable:
```text
make PREFIX=/usr install
```## Screenshot

## License
Copyright (c) 2022 Gustavo Costa. Distributed under the MIT license.