Posts

Showing posts from November, 2017

awk useful commands examples

awk useful comand examples. How to Output Field Separator Variable, Number of Fields in a record, To print Non-system users and ignoring "nobody" etc.  You may reading link below : How to reset root password on centos 7 CentOS/RHEL Use yum Command To Downgrade Upgrade or Rollback Updates Generate and Verify Files with MD5 Checksum in Linux use inotify-tools on centos For example, the output passwd file use awk command $ cat /etc/passwd | awk -F':' 'BEGIN{ print "Name\tUID,GID\tHomeDirectory" }{print $1"\t"$3,$4"\t"$6}' The output as below: Name UID,GID HomeDirectory root 0 0 /root bin 1 1 /bin daemon 2 2 /sbin adm 3 4 /var/adm lp 4 7 /var/spool/lpd sync 5 0 /sbin shutdown 6 0 /sbin halt 7 0 /sbin mail 8 12 /var/spool/mail operator 11 0 /root games 12 100 /usr/games ftp 14 50 /var/ftp nobody 99 99 / systemd-bus-proxy 999 998 / systemd-network 192 192 / dbus 81 81 / polkitd 998 997 / tss 59 59 /dev/null s