palkia has asked for the wisdom of the Perl Monks concerning the following question:

I have a few questions about the information in this page regarding some unary operators.
I know this is a lot, so if possible just explain what you can that wasn't explained before,
and hopefully the total of answers will cover it all.

1. whats uid/gid ?
2. whats the difference between effective uid/gid to real uid/gid?
3. whats "owned" ?
4. whats a "plain file" ?
5. -d , how can a file be a directory ?
5. whats everything between -l and -t ?
6. same question for -A and -C ?

10q very very much
  • Comment on some questions about specific unary operators

Replies are listed 'Best First'.
Re: some questions about specific unary operators
by ikegami (Patriarch) on Apr 11, 2011 at 21:33 UTC

    1. The user id and group id of the process. These are used to determine if the process has permission to take certain actions.

    2. Processes can change their user id and group id in order to do something as a different user or group. This relates to that. In your programs, there will be no differences between the real and effective ids.

    3. Every file is owned by a user and a group. These are used to determine how a process can access the file.

    4. A file is anything that can be in a directory. A plain file is one that's not a directory, sym link, socket, pipe or device (etc?).

    5. A file is a directory if it was created using mkdir(2).

    5. Named pipes, sockets, and devices are special types of files. See chmod(1) for info on the three special bits.

    6. They return the difference between the time the script started and the time the file was modified, accessed or had its inode changed, as a fractional number of days.