DELAPARRA
Index
Color
NL
Category: CLI commands

cat

Explained by Updated

What is cat?

cat: Concatenate and print — Print the entire contents of a file to the terminal. cat prints the contents of a file to the terminal. Its name comes from concatenate, because it can also join several files: cat part1.csv part2.csv > all.csv. It is the quickest way to look at a short file, such as a config file or a small log. For anything long, less is better, because it lets you scroll and search instead of flooding the screen.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about cat

What should you keep in mind with cat?

You often see cat file | grep something. It works, but grep something file does the same without the extra process. For logs that are still being written, tail -f follows new lines as they arrive. And be careful with cat on files that might contain secrets, such as .env, when you are sharing your screen or recording a session.

At a glance

CategoryCLI commands
Explained by
Updated

More CLI commands terms

All terms starting with C

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.