Skip to main content

Output the first part of files.

# To output the first few lines of a file:
head --lines <count> <path/to/file>

# To output the first few bytes of a file:
head --bytes <count> <path/to/file>

# To output everything but the last few lines of a file:
head --lines -<count> <path/to/file>

# To output everything but the last few bytes of a file:
head --bytes -<count> <path/to/file>