logname – print user´s login name

A UNIX Command

$logname
jeffrin
$logname --help
Usage: logname [OPTION]
Print the name of the current user.

      --help     display this help and exit
      --version  output version information and exit

Report logname bugs to bug-coreutils@gnu.org
GNU coreutils home page: 
General help using GNU software: 
For complete documentation, run: info coreutils 'logname invocation'
$logname --version
logname (GNU coreutils) 8.5
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later .
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by FIXME: unknown.
$

UNIX Explanation

Solaris Based Explanation
The logname  utility will write the user's  login name to
standard output.  The login name is the string that would
be  returned  by the  getlogin(3C)  function.  Under  the
conditions  where  getlogin()  would fail,  logname  will
write  a diagnostic  message to  standard error  and exit
with a non-zero exit status.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s