How to Read Files Using Bat in Ubuntu – Cat Clone

Bat is a free and open source command line file reading application for Linux, Windows and MacOS. It is a clone of popular cat. Using bat, you can read data from the file and it gives their content as output. It comes with syntax highlighting, git integration, show non-printable characters, automatic paging, file concatenation, customizing and theming the output and many more. It is written in Rust and released under MIT and Apache 2.O.

Bat command

How to Install Bat on Ubuntu

To install the bat on your Ubuntu Linux system, run below command.

sudo apt install bat

For the complete bat usage details run below command.

batcat --help

Bat syntax

batcat [OPTIONS] [FILE]...

Example: To open a file, run below command. Below command will open a file name file.html in the Home directory. You can also display multiple files at once.

batcat file.html

Bat command

To show the non printable characters run below command.

batcat -A file.html
If you liked this article, please subscribe to our YouTube Channel. You can also stay connected with us on X (Twitter) and Facebook.

Also Read:  CubeShooter 3D Arcade Style Shooter Game

Leave a Reply