Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

whoami(1) [opensolaris man page]

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

DIRCOLORS(1)							   User Commands						      DIRCOLORS(1)

NAME
dircolors - color setup for ls SYNOPSIS
dircolors [OPTION]... [FILE] DESCRIPTION
Output commands to set the LS_COLORS environment variable. Determine format of output: -b, --sh, --bourne-shell output Bourne shell code to set LS_COLORS -c, --csh, --c-shell output C shell code to set LS_COLORS -p, --print-database output defaults --help display this help and exit --version output version information and exit If FILE is specified, read it to determine which colors to use for which file types and extensions. Otherwise, a precompiled database is used. For details on the format of these files, run `dircolors --print-database'. AUTHOR
Written by H. Peter Anvin. 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 dircolors is maintained as a Texinfo manual. If the info and dircolors programs are properly installed at your site, the command info dircolors 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. dircolors 6.7 December 2006 DIRCOLORS(1)
Man Page

12 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Intruder Alert

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)
Discussion started by: shawnbishop
1 Replies

2. UNIX for Dummies Questions & Answers

Unix "find" question

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)
Discussion started by: Lindarella
2 Replies

3. UNIX for Dummies Questions & Answers

Alias commands

how do you alias a command... Like say I wanted kitten to exicute the command whoami. how would I do that? Thank you for your time. (2 Replies)
Discussion started by: Mars8082686
2 Replies

4. Shell Programming and Scripting

Get username in script

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)
Discussion started by: willc0de4food
9 Replies

5. UNIX for Dummies Questions & Answers

Help with this please

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)
Discussion started by: moe2266
2 Replies

6. UNIX for Dummies Questions & Answers

cant get this to work

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)
Discussion started by: iago
6 Replies

7. UNIX for Dummies Questions & Answers

removing a line from a file and then placing into another file

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)
Discussion started by: iago
1 Replies

8. Shell Programming and Scripting

Text formatting in Perl.

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)
Discussion started by: fenox
2 Replies

9. Shell Programming and Scripting

Perl - Command assingment to variable.

Hi How do i assign the output of a unix command to a variable ? say i want the whoami output to be assigned to a variable? Thanks (2 Replies)
Discussion started by: PrasannaKS
2 Replies

10. Shell Programming and Scripting

whoami export

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)
Discussion started by: lhareigh890
1 Replies

11. AIX

Capture whoami log on a specific command

// 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)
Discussion started by: Daniel Gate
3 Replies

12. Shell Programming and Scripting

List Process running under current user

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)
Discussion started by: aravindadla
6 Replies