What if you want to get the 7th line of a text file. For example, you could get the 7th line of the /etc/hosts file, by using the head and tail commands, like this:
An even easier way to do it, is:# head -7 /etc/hosts | tail -1 # Licensed Materials - Property of IBM
# sed -n 7p /etc/hosts # Licensed Materials - Property of IBM
If you found this useful, here's more on the same topic(s) in our blog:
- Measuring network throughput
- Finding files with no defined user or group
- Difference between sticky bit and SUID/GUID
- Lsmksysb
- A quick way to remove all printer queues
UNIX Health Check delivers software to scan Linux and AIX systems for potential issues. Run our software on your system, and receive a report in just a few minutes. UNIX Health Check is an automated check list. It will report on perfomance, capacity, stability and security issues. It will alert on configurations that can be improved per best practices, or items that should be improved per audit guidelines. A report will be generated in the format you wish, and the report includes the issues discovered and information on how to solve the issues as well.
Interested in learning more?
Interested in learning more?




