Decade and years ago, PCTools was one of top list most widely used tool on viewing files with equivalent hexa codes.
Here's how to convert or view a text on its equivalent hex codes.
Assuming file.txt
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hey diddle diddle,
The cat and the fiddle,
The cow jumped over the moon,
The little dog laughed to see such a sight,
And the dish ran away with the spoon.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
How to view a file named file.txt in hex code format?
# xxd < file.txt
Below is the screen dumped:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0000000: 2020 2020 4865 7920 6469 6464 6c65 2064 Hey diddle d
0000010: 6964 646c 652c 0a20 2020 2054 6865 2063 iddle,. The c
0000020: 6174 2061 6e64 2074 6865 2066 6964 646c at and the fiddl
0000030: 652c 0a20 2020 2054 6865 2063 6f77 206a e,. The cow j
0000040: 756d 7065 6420 6f76 6572 2074 6865 206d umped over the m
0000050: 6f6f 6e2c 0a20 2020 2054 6865 206c 6974 oon,. The lit
0000060: 746c 6520 646f 6720 6c61 7567 6865 6420 tle dog laughed
0000070: 746f 2073 6565 2073 7563 6820 6120 7369 to see such a si
0000080: 6768 742c 0a20 2020 2041 6e64 2074 6865 ght,. And the
0000090: 2064 6973 6820 7261 6e20 6177 6179 2077 dish ran away w
00000a0: 6974 6820 7468 6520 7370 6f6f 6e2e 0a0a ith the spoon...
00000b0: 2020 2020 5468 6973 2077 6f72 6420 6973 This word is
00000c0: 206e 6f74 2069 6e20 7468 6520 6469 6374 not in the dict
00000d0: 696f 6e61 7279 204c 696e 7578 0a20 2020 ionary Linux.
00000e0: 2073 6f6c 6172 6973 0a solaris.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
How to covert text file to hexa file format?
This is simply dumping or redirecting the hexa code stdout output to a file as follows
# xxd < file.txt > newhexfile.txt
If you require to dump the first 100 characters of a file, do as follows
# xxd -l 100 < file.txt
How to convert file to binary digits rather than hex codes?
# xxd -b < file.txt
# xxd -b < file.txt > newbinaryfile.txt
How to view file on on EBCDIC character encoded format?
# xxd -b -E < file.txt
How to have a plain hex dump file or postscript continuous hexdump file style?
# xxd -p < file.txt
Gone are the days of hex viewer from Norton Utilities and PC Tools.
HTH
Subscription
Categories
- HowTos (612)
- Linux Devices (40)
- Linux Diggs (620)
- Linux News (1541)
- Linux Videos (24)
Recent Posts
Blog Archive
-
▼
2007
(340)
-
▼
August
(95)
- KCron - GUI task scheduler
- Linux backups powered by Tar
- INQ7 front page image retrieval
- using wget for data and file transfers
- BibleTime - Bible study from Linux howto
- human readable DVD/CD drive technical details
- sound-juicer - alternative audio CD ripper install
- Stellarium - watch the sky from Linux
- Munin - monitor linux hosts install howto
- blocking yahoo chat messenger
- string manipulation using cut linux command
- graphing skystream DVB receiver's Eb/No and signal...
- BZFlag - 3D multi-player tank game install howto
- screenshot and snapshot creations howtos
- string parsing using bash
- grep multiple character from string or file
- enable and disable of telnet service
- grep multiple strings from a file
- remove spaces from filenames
- ISO creation and CD/DVD burning from terminal
- send a message to user's terminal
- retrieve GMail emails via terminal using fetchmail
- more of activating and deactivating network card
- set new mysql password
- TIP: enable thumbnail display images from apache
- monitor large mailbox users
- using the linux yes command
- string manipulation using tr linux command
- install and play 2D chess game in linux
- more firefox tips and tricks
- recover root password on linux
- establish ssh connection from different port
- uniq linux command
- remove blank lines using grep or sed
- date and time sync via NTP server howto
- who am I
- delete spam email and folder regularly howto
- hello world bash and perl script
- passwordless rdesktop session with XP howto
- force VGA screen resolution and screen mode
- RealPlayer 10 for linux install howto
- Grip - CD ripper install howto
- Banshee - music management and playback
- gnome music applet install howto
- Pirut and yum-updatesd - software management
- Alacarte - editing panel menus install howto
- access NTFS drive in Fedora
- FileLight - graphical disk usage and statistics
- TestDisk- partition tool install howto
- using /dev/null in linux terminal
- yahoo messenger in fedora install howto
- check and repair MS-DOS file systems howto
- using fdformat and mkdosfs from terminal
- Tremulous - Quake 3 install howto
- block consecutive IP address using scripts
- using floppy linux command from terminal
- display word or text file in reversed pattern
- convert a file to equivalent hex/binary code
- spell check text file from terminal
- create screen timer from linux howto
- recreate deleted /dev/null
- harddisk monitoring using smartctl
- bind ssh to selected IP address
- restrict su command to superuser only
- thunderbird install howto
- dovecot POP3/POP3S server with SSL/TLS install howto
- qpopper POP3 server install howto
- my other linux pages
- more ssh log parsing and monitoring
- checking daemon service bash script
- HTML CHM help file viewer install howto
- du - the disk usage linux command howto
- gnome language translator install howto
- display linux memory information howto
- display the number of processor howto
- 3d tabletennis game install howto
- Nokia N70 on Fedora via USB data cable
- Fedora 7 as guest host from VirtualBox
- at - jobs scheduling howto
- Nokia 70 linux connection via bluetooth dongle howto
- crontab - jobs scheduling howto
- managing daemon services howto
- create your own linux OS distro howto
- kernel devel headers install howto
- more multimedia browser plugins install howto
- numlock on with X install howto
- Fedora and RHEL differences
- create virtual terminals with single ssh connection
- virtual CentOS using VMWare 5.5.4 install howto
- VMware workstation 5.5.4 install howto
- 50 quick linux command tips part 4
- 5 SysAds permanent static route story
- ssh log parsing and monitoring
- removable drives, devices and media preferences
- gnome-blog desktop blogging install howto
-
▼
August
(95)
Wednesday, August 15, 2007
convert a file to equivalent hex/binary code
Subscribe to:
Post Comments (Atom)
ILoveTux - howtos and news | About | Contact | TOS | Policy
0 comments:
Post a Comment