- Linux Admin Tutorial
- Home
- CentOS Overview
- Basic CentOS Linux Commands
- File / Folder Management
- User Management
- Quota Management
- Systemd Services Start and Stop
- Resource Mgmt with systemctl
- Resource Mgmt with crgoups
- Process Management
- Firewall Setup
- Configure PHP in CentOS Linux
- Set Up Python with CentOS Linux
- Configure Ruby on CentOS Linux
- Set Up Perl for CentOS Linux
- Install and Configure Open LDAP
- Create SSL Certificates
- Install Apache Web Server CentOS 7
- MySQL Setup On CentOS 7
- Set Up Postfix MTA and IMAP/POP3
- Install Anonymous FTP
- Remote Management
- Traffic Monitoring in CentOS
- Log Management
- Backup and Recovery
- System Updates
- Shell Scripting
- Package Management
- Volume Management
- Linux Admin Useful Resources
- Linux Admin - Quick Guide
- Linux Admin - Useful Resources
- Linux Admin - Discussion
Linux Admin - head Command
head is a basic opposite of tail in relation to what part of the file operations are performed on. By default, head will read the first 10 lines of a file.
head offers similar options as tail −
Switch | Action |
---|---|
-c | Output last denoted in kilobytes |
-n | Output n number of lines from eof |
-q | No headers only file content |
Note − Head offers no -f option, since the files are appended from the bottom.
head is useful for reading descriptions of configuration files. When making such a file, it is a good idea to use the first 10 lines effectively.
[root@centosLocal centos]# head /etc/sudoers ## Sudoers allows particular users to run various commands as ## the root user, without needing the root password. ## ## Examples are provided at the bottom of the file for collections ## of related commands, which can then be delegated out to particular ## users or groups. ## ## This file must be edited with the 'visudo' command. ## Host Aliases [root@centosLocal centos]#
basic_centos_linux_commands.htm
Advertisements