Yes, you can use the head command with multiple files. When you specify multiple files, head will display the first few lines of each file, separating the output for each file with a header indicating the file name.
Example Usage
To display the first 10 lines of multiple files:
head file1.txt file2.txt file3.txt
Specifying Number of Lines
You can also specify the number of lines to display for each file:
head -n 5 file1.txt file2.txt
This command will show the first 5 lines of file1.txt followed by the first 5 lines of file2.txt.
Using head with multiple files is helpful for comparing the beginnings of different files or quickly checking their contents.
