Using the Find command

Hello, I'm having troubles with the Find command. I was wondering how to use specifically the -gid, uid, -samefile options with Find and, also where can I download a copy of Linux?

Hello.

The "how to" is explained clearly in the manual page for find. What, specifically, do you mean with "specifically"?

With respect to where you can download Linux, the answer is - lots of places. Where, might depend on which one you want.

Google "download <distribution name goes here>" and you shall find. Did you have a specific use-case in mind, or are just speaking generally?

Have a look at:

find(1) - Linux man page

Regards

Thank you, I know have a copy! I meant without any other alternatives and, I think I have some sort of misunderstanding... So -gid will show me the files that a user group has access too?

In addition to what Scott has already said, note that the behavior of the -gid , -uid , and -samefile primaries varies depending on what operating system you're using.

The GNU utilities version of find has these primaries and they behave one way. The BSD version of find has these primaries and at least the first two of them behave slightly differently. Most other versions of these do not provide these primaries at all (and will give you a syntax error if you try to use them) since these primaries are not required by (nor even mentioned in) the standards.

If you want help figuring out how to use utilities on a system, we need to know what operating system you're using. And, it frequently helps to also know which shell you are using.

We can't answer that without knowing what operating system you're using.

And lots of other factors affect file access in addition to the file's numeric group ID and/or alphanumeric group name. If you're using GNU utilities find AND the effective user ID of the process trying to access the file does not have permission to do so AND there is no ACL associated with this file AND the number given as the argument to the -gid primary is a valid group ID AND (the effective group ID or one of the supplementary group IDs of the running process matches the file's group ID OR the permissions on the file allow anyone to perform the type of access the process is requesting) then the process has access to open the file, remove the file, truncate the file, or rename the file. And, of course, depending on what you are trying to do, other restrictions might apply such as the time of day, the number of links to the file, etc. which might further restrict access to a file.

If you're using a BSD-based find utility, the results are based on a group name or group ID instead of just a group ID.

Not to change the subject, or distract you from conversation at hand. But depending on the OS you are using, and the ability to install you have. You should take a look at the locate command. It's much more user friendly,.