Linux: cat with separators among files

catcommandlinux

In Linux if you type cat *, you will get something like this:

line1 from file1
line2 from file1
line1 from file2
line1 from file3
line2 from file3
line3 from file3

What I would like is to display a separator among files. Something like this:
line1 from file1
line2 from file1
XXXXXXXXXXXX
line1 from file2
XXXXXXXXXXXX
line1 from file3
line2 from file3
line3 from file3

Is that easily possible with a one-liner easy to type by heart?

Best Answer

If you're not too fussy about the appearance of the separator:

tail -n +1 *
Related Topic