:) as soon as i installed my software a couple of weeks ago..
(fedora core 2 vs, 2.6.8-1.521) i decided to switch the shell to sh shell and i know that .bashrc is the bash profile file(???) i want to use the sh version of the same file and make it the main profile file.. how can I switch it and... (3 Replies)
I search the web and found the following statements
.....
The /etc/profile file is a system wide initialization script which is run at login time for each user, while .profile is the users own login initialization. The .bashrc file is an initialization file run by each interactive invocation... (1 Reply)
Hello,
I got this question which tells me to customize my login script. Some people in the forums suggested to modify the .profile file in my home directory. I did so, but none of my customizations show up when I open the terminal after.
So, I tried to modify other files in my home directory,... (1 Reply)
hi i am using cygwin and would like to modify my .bashrc file. How can search to find where it is? I have looked at multiple bashrc file in /etc but none of them seemed to work..thanks (12 Replies)
i have made a few changes to my bashrc file...have set a few environmental variable that my shell scripts use. Is there any way that these changes can reflect in evryone else's bashrc who are in the network or do all of them have to copy those changes to their own bashrc file. (2 Replies)
I am trying to do some changes at bashrc file located at /etc directory of my server. First I tried to edit bashrc via FTP downloaded on my pc changed it and loaded back, but it seems like changes are not reflecting.
Therefore I tried to change it via putty shel using vim bashrc command. but... (4 Replies)
I have modified the .bashrc. The problem is that when I write a long command,
it does not write on the next line but continues to write on the same line.
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for... (1 Reply)
Hello All,
I was wondering if there is a way to execute a command in my ".bashrc" file based on how I logged into the PC?
I was thinking maybe there is a way to check how the user (*myself) logged in, maybe somehow with the who command along with something else, but I'm not sure... I know I... (7 Replies)
It deletes my .bashrc file rarely but predictability after some unknown count of Mac's restarts. Has someone ever faced such behavior?
How do I prevent OS X from modifying .bashrc? What ownership/permission should I set up to not let it happen?
OS X Lion. (6 Replies)
Discussion started by: scrutinizerix
6 Replies
LEARN ABOUT PHP
posix_getpwuid
POSIX_GETPWUID(3) 1 POSIX_GETPWUID(3)posix_getpwuid - Return info about a user by user idSYNOPSIS
array posix_getpwuid (int $uid)
DESCRIPTION
Returns an array of information about the user referenced by the given user ID.
PARAMETERS
o $uid
- The user identifier.
RETURN VALUES
Returns an associative array with the following elements:
The user information array
+--------+---------------------------------------------------+
|Element | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| name | |
| | |
| | The name element contains the username of the |
| | user. This is a short, usually less than 16 char- |
| | acter "handle" of the user, not the real, full |
| | name. |
| | |
|passwd | |
| | |
| | The passwd element contains the user's password |
| | in an encrypted format. Often, for example on a |
| | system employing "shadow" passwords, an asterisk |
| | is returned instead. |
| | |
| uid | |
| | |
| | User ID, should be the same as the $uid parame- |
| | ter used when calling the function, and hence |
| | redundant. |
| | |
| gid | |
| | |
| | The group ID of the user. Use the function |
| | posix_getgrgid(3) to resolve the group name and a |
| | list of its members. |
| | |
| gecos | |
| | |
| | GECOS is an obsolete term that refers to the |
| | finger information field on a Honeywell batch |
| | processing system. The field, however, lives on, |
| | and its contents have been formalized by POSIX. |
| | The field contains a comma separated list con- |
| | taining the user's full name, office phone, |
| | office number, and home phone number. On most |
| | systems, only the user's full name is available. |
| | |
| dir | |
| | |
| | This element contains the absolute path to the |
| | home directory of the user. |
| | |
| shell | |
| | |
| | The shell element contains the absolute path to |
| | the executable of the user's default shell. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
Example use of posix_getpwuid(3)
<?php
$userinfo = posix_getpwuid(10000);
print_r($userinfo);
?>
The above example will output something similar to:
Array
(
[name] => tom
[passwd] => x
[uid] => 10000
[gid] => 42
[gecos] => "tom,,,"
[dir] => "/home/tom"
[shell] => "/bin/bash"
)
SEE ALSO posix_getpwnam(3), POSIX man page GETPWNAM(3).
PHP Documentation Group POSIX_GETPWUID(3)