FreeBSD 4.11 manual page repository

FreeBSD is a free computer operating system based on BSD UNIX originally. Many IT companies, like DeployIS is using it to provide an up-to-date, stable operating system.

file2c - convert file to c-source



      file2c - convert file to c-source


      file2c [string] [string]


      The file2c utility reads a file from stdin and writes it to stdout, con‐
      verting each byte to its decimal representation on the fly.
      If the first [string] is present, it is printed before the data; if the
      second [string] is present, it is printed after the data.
      This program is used to embed binary or other files into C source files,
      for instance as a char[].


      The command:
            date | file2c ’const char date[] = {’ ’,0};’
      will produce:
            const char date[] = {


Based on BSD UNIX
FreeBSD is an advanced operating system for x86 compatible (including Pentium and Athlon), amd64 compatible (including Opteron, Athlon64, and EM64T), UltraSPARC, IA-64, PC-98 and ARM architectures. It is derived from BSD, the version of UNIX developed at the University of California, Berkeley. It is developed and maintained by a large team of individuals. Additional platforms are in various stages of development.