Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cat * command in linux

What does cat * command do in Linux Terminal? I used it along with a file-name

cat * file-name

I got a large output, with lots of garbage characters and proper formatted text. Towards the end I felt it was the kernel configuration parameters and at last was my file. I am guessing it is the ram content, that was displayed. Is that right?

like image 895
Linux Bie Avatar asked Feb 16 '23 03:02

Linux Bie


1 Answers

The * character is interepreted as a wildcard by your shell. This means you pass every file and directory (except hidden ones) to cat. So what you are seeing is not the content of your RAM but the content of all files of your current directory.

like image 75
scai Avatar answered Feb 27 '23 11:02

scai