User Tools

List All users with their username and full name

cat /etc/passwd | cut -d: -f1,5 | sed s/:/" "/g

“s/” denotes the replace the next thing the “:” shows what to replace, then the “ ” shows what to replace with and the /g at the end means replace all instances on the line, not jus tthe first one. so that will basically change all colons to spaces on any lines returned.

– Main.FredPettis - 25 Feb 2010

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also, you acknowledge that you have read and understand our Privacy Policy. If you do not agree, please leave the website.

More information