Yes, the head command can be used with multiple files. When you specify multiple files as arguments, head will display the first few lines of each file in sequence. It will also include a header indicating the file name before the lines from each file.
Here’s an example of how to use head with multiple files:
head file1.txt file2.txt
This command will display the first 10 lines of file1.txt followed by the first 10 lines of file2.txt. If you want to specify a different number of lines to display from each file, you can use the -n option:
head -n 5 file1.txt file2.txt
This will show the first 5 lines from both file1.txt and file2.txt.
