top of page

Print the name of a file and the file's contents

  • Writer: Zach Pfeffer
    Zach Pfeffer
  • Apr 11, 2018
  • 1 min read

This post lists a Linux command that will print the name of a file and then print the contents of that file.

The following command will print the name of the file and the files contents:

find . -type f -print -exec cat '{}' \;

References

  • Find man page @ link

  • GNU image from link

© 2025 by Centennial Software Solutions LLC.

bottom of page