Forrest logo
back to the textutil tool

textutil:tldr:399c8

textutil: Convert `foo.rtf` into `foo.html`.
$ textutil -convert ${html} ${path-to-foo-rtf}
try on your machine

This command is invoking the "textutil" utility with certain parameters to convert a file from HTML format to RTF (Rich Text Format).

  • "textutil" is a command-line tool available on macOS that can manipulate and convert text files.
  • "-convert" is an option used to specify the conversion operation to be performed.
  • "${html}" is a placeholder for the path or filename of the HTML file you want to convert. You need to replace it with the actual path or filename.
  • "${path-to-foo-rtf}" is a placeholder for the desired output RTF file path or filename. You also need to replace it with the desired location and name of the output file.

For example, if you want to convert a file named "example.html" located in the current directory into an RTF file named "output.rtf" located in the same directory, you would run the command as follows:

textutil -convert html example.html output.rtf

After execution, the HTML file will be converted to RTF format and saved in the specified location with the provided filename.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the textutil tool