> For the complete documentation index, see [llms.txt](https://ploegert.gitbook.io/til/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ploegert.gitbook.io/til/os/unix/terminal/cat-files-with-color-using-bat.md).

# Cat Files With Color Using Bat

The time-tested utility `cat` is probably one of the most used unix commands. It prints the contents of the file to stdout. You can use it to get a quick view of a file.

![example of cat](https://i.imgur.com/kb1UjPW.png)

We live in a world of color and our terminal emulators are capable of so much more. There is an alternative to `cat`, called `bat`, that provides syntax highlighting based on the type of file.

![example of bat](https://i.imgur.com/ieL7v2Q.png)

This is an open-source utility written in Rust. You can check it out on [github](https://github.com/sharkdp/bat).
