Just as another idea, try tail -n +1 ./tmp/*.txt

==> ./tmp/file1.txt <==
<contents of file1.txt>

==> ./tmp/file2.txt <==
<contents of file2.txt>

==> ./tmp/file3.txt <==
<contents of file3.txt>
Answer from Random832 on Stack Exchange
🌐
GeeksforGeeks
geeksforgeeks.org › linux-unix › cat-command-in-linux-with-examples
Cat Command in Linux - GeeksforGeeks
September 14, 2017 - When a filename begins with a dash (-), Linux may treat it as a command option. The -- option is used with cat to tell the system that what follows is a filename, not an option.
🌐
nixCraft
cyberciti.biz › nixcraft › howto › linux › cat command in linux / unix with examples
cat Command in Linux / Unix with examples - nixCraft
December 2, 2025 - Basic file operation on a text file such as displaying or creating new files. ... cat filename cat > filename cat [options] filename cat file1 cat >> file2 cat file3 | command cat file4 | grep something
🌐
PhoenixNAP
phoenixnap.com › home › kb › sysadmin › linux cat command (with examples)
Linux cat Command (With Examples) | phoenixNAP KB
September 4, 2025 - Instead of displaying the file contents on the screen, redirect the file contents to another file. For example: ... The command has no output. If the destination filename doesn't exist, the command creates it. Run cat on test3.txt to see the file's contents:
🌐
Server Academy
serveracademy.com › blog › the-linux-cat-command
The Linux cat Command - Server Academy
For more advanced usage and practical ... out our [Linux Essentials Course] at ServerAcademy.com. The cat command has a counterpart called tac, which displays file content in reverse order. This can be useful for specific tasks that require the last lines to appear first. To display the contents of a file in reverse order, use the tac command: ... This command will show the last line of filename.txt first, ...
🌐
Hostinger
hostinger.com › home › tutorials › how to use the linux cat command
How to Use the Linux cat Command With Examples
February 24, 2025 - The cat command in Linux is primarily used to display file contents, concatenate files, and create new files. It can also append text to existing files, number lines, and reveal non-printing characters.
Find elsewhere
🌐
Linuxize
linuxize.com › home › linux commands › how to use the cat command in linux
How to Use the cat Command in Linux | Linuxize
October 10, 2018 - To display the invisible line ending character use the -e argument: ... The line endings will be displayed as $. When passing two or more file names as arguments to the cat command, the contents of the files will be concatenated.
🌐
InMotion Hosting
inmotionhosting.com › inmotion hosting home › support › server technologies › linux › using the linux cat command
Using the Linux cat command | InMotion Hosting
August 17, 2021 - Another way you can run the cat command is with an * asterisk, this denotes any file. So if you were still in your /access-logs/ directory and ran cat * it would simply display the data of all files in the directory. You can use the * asterisk anywhere in the filename, so for instance cat example* ...
🌐
Javatpoint
javatpoint.com › linux-cat
Cat Command in Linux/Unix with Examples - javatpoint
Cat Command in Linux/Unix with Examples for beginners and professionals with examples on files, directories, permission, backup, ls, man, pwd, cd, chmod, man, shell, pipes, filters, regex, vi etc..
🌐
Hostman
hostman.com › tutorials › how to use the linux cat command: tutorial and examples
How to Use the Linux Cat Command | Hostman
December 26, 2025 - This command instructs cat to receive input rom the terminal and to redirect it into the filename.txt. Press Enter. The terminal will be waiting for input. Enter the text you want in the file.
Price   $
Address   1999 Harrison St 1800 9079, 94612, Oakland
🌐
HowtoForge
howtoforge.com › home › 10 linux cat command examples for beginners
10 Linux cat Command Examples for Beginners
To cross-verify the existence of ... to another file. This can be done in the following way: $ cat [filename-whose-contents-is-to-be-copied] > [destination-filename]...
🌐
Wikipedia
en.wikipedia.org › wiki › Cat_(Unix)
cat (Unix) - Wikipedia
1 month ago - Beyond other benefits, the input redirection forms allow command to perform random access on the file, whereas the · cat examples do not. This is because the redirection form opens the file as the stdin file descriptor which command can fully access, while the · cat form simply provides the data as a stream of bytes. ... cat is unnecessary is where a command defaults to operating on stdin, but will read from a file, if the filename is given as an argument.
🌐
W3Schools
w3schools.com › bash › bash_cat.php
Bash cat Command - Concatenate and Display Files
The cat command is used to show the content of files in the terminal. You can also use it to combine multiple files into one. To display the content of a file, use cat filename:
🌐
Unix Community
community.unix.com › shell programming and scripting
cat and output filename - Shell Programming and Scripting - Unix Linux Community
October 22, 2009 - Hi, how I can display a file with cat and printing the filename before each line. e.g. file1 { one two three four five } Output: file1:one file2:two file1:three file1:four file1:five THANKS
🌐
MonoVM
monovm.com › 🖥 server 🖥 › cat command in linux with examples [updated] - 2024
CAT Command in linux with examples [Updated] - 2024
January 29, 2024 - cat ‘filename 1’ ‘filename 2’ ‘filename 3’ > “merged_filename” · After merging the contents of all the files, the combined data will be represented in the merged file. We hope you have a better grasp of the CAT command in Linux with examples.
🌐
TecMint
tecmint.com › home › linux commands › how to use the cat command in linux [22 useful examples]
22 Essential Cat Command Examples for Linux Users
July 14, 2023 - Reply ... What 'cat < file' does, is use the contents (not "contains") of file as the input for cat, taking the place of the keyboard. It is functionally equivalent to 'cat file', and is thus completely redundant.
🌐
Unix Community
community.unix.com › unix for beginners q & a › unix for dummies questions & answers
How to cat a file , name starts with "-" ? - UNIX for Dummies Questions & Answers - Unix Linux Community
November 15, 2003 - I have a question - beginning user, just learning unix. I have a file that name starts with a hypen -, such as a name like : -myfile (yes, I know shold not start files names like this, but this is the question I have…