Print the first n lines of file in Unix
5 May 2022 (Updated 5 May 2022)
Print the first 10 lines of file (10 is default):
cat /some/file.txt | head
Print the first 20 lines of file:
cat /some/file.txt | head -n 20
Tagged:
Unix
Thanks for your comment 🙏. Once it's approved, it will appear here.
Leave a comment