The below command gets the home directory of user if at all the user exists
getent passwd naresh | cut -f6 -d:
getent passwd naresh | cut -f6 -d:
Linux administration , Unix administration , Vmware Vsphere administration , Oracle DBA ,apache, backup, dhcp, dns, kvm, xen, kernel, ldap, kvm, monitoring, ticketing, networking, Mail servers, SAN,troubleshooting
2 comments:
thanks for the commands
There is a command specifically for this: getent
getent passwd someuser | cut -f6 -d:
Post a Comment