Celeb Glow
news | March 17, 2026

Save 10 lines from Help into txt file

I need to save first 10 lines from manual for command man to txt file.

First step I have command man man but what to do next?

Thanks for help.

1

1 Answer

Pipes and head will do what you need:

man man | head -10 > file.txt

head -n where n = number of lines you want

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy