xxd.rst 864 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. .. SPDX-License-Identifier: GPL-2.0+:
  2. xxd command
  3. ===============
  4. Synopsis
  5. --------
  6. ::
  7. xxd <interface> <dev[:part]> <file>
  8. Description
  9. -----------
  10. The xxd command prints the file content as hexdump to standard out.
  11. interface
  12. interface for accessing the block device (mmc, sata, scsi, usb, ....)
  13. dev
  14. device number
  15. part
  16. partition number, defaults to 1
  17. file
  18. path to file
  19. Example
  20. -------
  21. Here is the output for a example text file:
  22. ::
  23. => xxd mmc 0:1 hello
  24. 00000000: 68 65 6c 6c 6f 20 77 6f 72 6c 64 0a 00 01 02 03 hello world.....
  25. 00000010: 04 05 ..
  26. =>
  27. Configuration
  28. -------------
  29. The xxd command is only available if CONFIG_CMD_XXD=y.
  30. Return value
  31. ------------
  32. The return value $? is set to 0 (true) if the file is readable, otherwise it returns a non-zero error code.