WHOAMI(1) User Commands WHOAMI(1)NAME
whoami - print effective userid
SYNOPSIS
whoami [OPTION]...
DESCRIPTION
Print the user name associated with the current effective user ID. Same as id -un.
--help display this help and exit
--version
output version information and exit
AUTHOR
Written by Richard Mlynarik.
REPORTING BUGS
Report bugs to <bug-coreutils@gnu.org>.
COPYRIGHT
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software. You may redistribute copies of it under the terms of the GNU General Public License
<http://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO
The full documentation for whoami is maintained as a Texinfo manual. If the info and whoami programs are properly installed at your site,
the command
info whoami
should give you access to the complete manual.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+--------------------+--------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+--------------------+--------------------+
|Availability | SUNWgnu-coreutils |
+--------------------+--------------------+
|Interface Stability | Uncommitted |
+--------------------+--------------------+
NOTES
Source for GNU coreutils is available on http://opensolaris.org.
whoami 6.7 December 2006 WHOAMI(1)
Check Out this Related Man Page
READLINK(1) User Commands READLINK(1)NAME
readlink - display value of a symbolic link
SYNOPSIS
readlink [OPTION]... FILE
DESCRIPTION
Display value of a symbolic link on standard output.
-f, --canonicalize
canonicalize by following every symlink in every component of the given name recursively; all but the last component must exist
-e, --canonicalize-existing
canonicalize by following every symlink in every component of the given name recursively, all components must exist
-m, --canonicalize-missing
canonicalize by following every symlink in every component of the given name recursively, without requirements on components exis-
tence
-n, --no-newline
do not output the trailing newline
-q, --quiet,
-s, --silent
suppress most error messages
-v, --verbose
report error messages
--help display this help and exit
--version
output version information and exit
AUTHOR
Written by Dmitry V. Levin.
REPORTING BUGS
Report bugs to <bug-coreutils@gnu.org>.
COPYRIGHT
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software. You may redistribute copies of it under the terms of the GNU General Public License
<http://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO readlink(2)
The full documentation for readlink is maintained as a Texinfo manual. If the info and readlink programs are properly installed at your
site, the command
info readlink
should give you access to the complete manual.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+--------------------+--------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+--------------------+--------------------+
|Availability | SUNWgnu-coreutils |
+--------------------+--------------------+
|Interface Stability | Uncommitted |
+--------------------+--------------------+
NOTES
Source for GNU coreutils is available on http://opensolaris.org.
readlink 6.7 December 2006 READLINK(1)
Good Day
I am running HP-UX 11.11 on a PA-RISC Server,when i login as a normal user and i type the command "whoami" i get the "Intruder Alert" on the display?
as follows
/triceps/triprod/bin $ whoami
Intruder alert.
/triceps/triprod/bin $
Why does this happen and must I be worried... (1 Reply)
I want to find all files in a particular directory that are over 45 days old and belong to the user that ran the script
so, setting $userid to the output of `whoami` I used this command:
find . -mtime +45 -user $userid -print | xargs rm
Which works fine when it finds results. However,... (2 Replies)
how would i go about getting the username of the person currently logged in, and then using the username in a shell script? i've tried variations of
user=whoami , 'whoami' , $whoami , and none of the above work :( lol
I'd like to get the username to then mount a network share such that the... (9 Replies)
Folks;
Can any one tell me what these commands below do:
user=$(/usr/ucb/whoami)
DZERO=${0}
PROG=$(basename ${DZERO})
while ; do
DZERO=$(ls -l ${DZERO} | awk '{print $NF}') done PDIR=$(dirname ${DZERO}) if ; then
PDIR=${PWD}
elif ; then
PDIR=${PWD}/${PDIR}
fi
:( (2 Replies)
whoami | grep < $1 | echo $1
trying to write a script that finds out who the user is and then takes occurences of that username from a file that is passed as an argument and then displays it (6 Replies)
grep `whoami` $1 >> file
this lets me take out the username from a file and then i move it to a file but i need it to do one step at a time because i want the occurences to be numbered like
1)HOME=/home/joe.bloggs
2)LOGNAME=joe.bloggs
instead of just
HOME=/home/joe.bloggs... (1 Reply)
Hiho,
I've got a variable $sth = `du -sh /home/$whoami`; where $whoami is actually logged user.
I want to have only the size of this directory eg. 2,7G.
I know its lame, but anyway.. how to do it? (2 Replies)
how can I use whoami on a script for ordinary user? it always says command not found. pls help
#!/bin/ksh
W='whoami'
DATE=`date "+%Y-%m-%d %H:%M:%S"`
echo " $DATE- by $W"
result
2011-03-29 09:46:16 - by
you wil noticed the by is blank...pls help..but in root, it works (1 Reply)
// AIX 6.1 TL8
Please advise on how to capture whoami log or the user and time info into a log file (i.e. /tmp/cmdcapture.log) whenever users are executing a certain command(s) so that I can keep the single log history (for all users) of who did what. The command(s) I need to monitor are a... (3 Replies)
Hi,
i need to list the processes running only under current logged in user.
EX:
$ whoami
oraaqw
$ ps -ef | grep tnslsnr
oraaqw 11403300 19267592 0 09:14:47 pts/3 0:00 grep tnslsnr
oraaqw 15794208 1 0 Jan 14 - 11:59... (6 Replies)