Unable to print usernames longer than 8 chars with "w" in linux -


i doing linux script extract users logged onto machine, where, , how long have been idle. far have been using "w" command in linux. noticed truncates usernames , source

i have 3 users logged on testuser testuser-new lala-testuser

they logged on either: testserver, or superdupertestserver

the output of w is:

testuser   pts/2    testserver       10:12   29.00s  0.15s  0.15s -bash testuser   pts/3    superdupertestse 10:12   21.00s  0.18s  0.18s -bash lala-tes   pts/4    superdupertestse 10:12   21.00s  0.18s  0.18s -bash 

i using "long listing" of output. there way fix this, or information source w using?

man w:

environment        procps_userlen               override  default width of username column.  defaults               8.         procps_fromlen               override default width of column.  defaults 16. 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -