Whoami: Difference between revisions

From ICO wiki
Jump to navigationJump to search
Aosadtsa (talk | contribs)
Aosadtsa (talk | contribs)
Line 17: Line 17:
<font size="1">
<font size="1">
root@desktop:~# whoami --help
root@desktop:~# whoami --help
Usage: whoami [OPTION]...
Usage: whoami [OPTION]...
Print the user name associated with the current effective user ID.
Print the user name associated with the current effective user ID.
same as id -un
same as id -un
Line 25: Line 28:


Report whoami bugs to big-coreutils@gnu.org
Report whoami bugs to big-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
General help using GNU software: <http://www.gnu.org/gethelp/>
For complete documentation, run info coreutils 'whoami invocation'
For complete documentation, run info coreutils 'whoami invocation'
</font>
</font>

Revision as of 12:06, 15 January 2015

Autor

Anastasia Osadtsaja, A21

Sissejuhatus

Käsk whoami (kokku kirjutatud, who am i – kes ma olen) kuvab sessiooni kasutajanime standardväljundisse. [2]

Milleks on vajalik whoami

Käsk on kasulik, kui kasutada shelle, näiteks ash ja sh, kus ei kuvata hetke kasutajanime käsureal. Kasulik on ka kasutada whoami peale su (substitute user - kasutaja vahetamine), mis vahetab sessiooni käigus kasutaja, ilma et logiks välja algse omaniku. [2]

Käsul on kaks võimalust: [2]

--help annab lühikese ülevaate, mida hoitakse man-is (built-in system manual).

root@desktop:~# whoami --help

Usage: whoami [OPTION]...

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

Report whoami bugs to big-coreutils@gnu.org

GNU coreutils home page: <http://www.gnu.org/software/coreutils/>

General help using GNU software: <http://www.gnu.org/gethelp/>

For complete documentation, run info coreutils 'whoami invocation'

–version väljastab mitmes versioon on süsteemil hetkel installitud. [2]

root@desktop:~# whoami --version whoami (GNU coreutils) 8.21 Copyright (C) 2013 Free Sofware Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are gree to change and redistribute it. There is no WARRANTY, to the extent premitted by law.

Written by Richard Mlynarik.

Kasutatud kirjandus

[1] http://unix.aspcode.net/view/635395087004115229187688/is-who-mom-likes-a-real-linux-command Viimati vaadatud: 09.12.14

[2] http://www.linfo.org/whoami.html Viimati vaadatud: 09.12.14

[3] http://unixhelp.ed.ac.uk/CGI/man-cgi?who+1 Viimati vaadatud: 09.12.14