Sponsored Content
Special Forums Cybersecurity Recursively find and change Permissions on Man pages Post 302178258 by era on Tuesday 25th of March 2008 06:00:09 AM
Old 03-25-2008
Quote:
Originally Posted by altamaha
I am using the suggested fi[n]d command, but I do not know how one would use the "greater than" check against the permission bits.
GNU find at least has some more advanced options for this. Is installing it an option?

Also, even with regular basic old-skool BSD find, I don't really think you need to painstakingly repeat the -type f -- just add parentheses, but note that you have to backslash-escape them because they are special to the shell, too.

Code:
find $MANDIR -type f \( -perm -7 -o -perm -6 -o -perm -5 -o -perm -3 -o -perm -2 -o -perm -1 \)

Of course, if you want to say "any bit except 4", that is doable too, at least with GNU find:

Code:
find $MANDIR -type f -perm /3

Also look at find2perl -- its documentation is somewhat terse but if you can't quite say what you want with the bare find(1) options, it might be less frustrating to make minor edits to a generated Perl script. Quick Googling brought up this brief tutorial
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Man pages

Hello , I just installed openssh in my system . I actually tried to man sshd but it says no entry , though there is a man directory in the installation which have the man pages for sshd . Can anyone tell me how should i install these man pages . DP (2 Replies)
Discussion started by: DPAI
2 Replies

2. UNIX for Dummies Questions & Answers

man pages

Hi, I've written now a man pages, but I don't knwo how to get 'man' to view them. Where have I to put this files, which directories are allowed?? THX Bensky (3 Replies)
Discussion started by: bensky
3 Replies

3. UNIX for Dummies Questions & Answers

man pages

Hi folks, I want to know all the commands for which man pages are available. How do i get it? Cheers, Nisha (4 Replies)
Discussion started by: Nisha
4 Replies

4. UNIX for Dummies Questions & Answers

man pages

When reading man pages, I notice that sometimes commands are follwed by a number enclosed in parenthesis. such as: mkdir calls the mkdir(2) system call. What exactly does this mean? (4 Replies)
Discussion started by: dangral
4 Replies

5. UNIX for Dummies Questions & Answers

how to read man pages

can anybody explain me how to read unix man pages? for example when i want to get information about ps command man ps gives me this output: *********************************** Reformatting page. Please wait... completed ps(1) ... (2 Replies)
Discussion started by: gfhgfnhhn
2 Replies

6. Solaris

loading man pages

Hi, I am using solaris. I have to load the some man pages on different node from solaris. I have no basic idea regarding this. can anyone plz give me some basic ideas so that i can proceed. Thanks in advance. (3 Replies)
Discussion started by: ravi rajeev
3 Replies

7. UNIX for Advanced & Expert Users

script to recursively change permissions on file and dirs differently?

Hi there, I need to change all files/dirs 1. all files with 744 2. all dirs with 755 is there a script for that ? thanks, thegunman (13 Replies)
Discussion started by: TheGunMan
13 Replies

8. Solaris

MAN PAGES

Hi everyone, I have a small query, in solaris the man pages get displayed on half of the terminal , can i get a full terminal or full screen display ?:) (2 Replies)
Discussion started by: M.Choudhury
2 Replies

9. HP-UX

Looking for some man pages.

Can anyone supply me with the man pages for: omnidatalist omnibarlist omnisap.exe I prefer the source man pages in nroff format. A clue about the software bundles which supply these man pages is fine as well. OS: HP-UX TIA (11 Replies)
Discussion started by: sb008
11 Replies

10. Shell Programming and Scripting

Man pages for Pthreads

"how to see the man pages related to pthreads". while executing the command man pthread_t . im getting the following error!!!!! No manual entry for pthread. (3 Replies)
Discussion started by: Muthukumar U
3 Replies
ACL_GET_PERM(3) 					   BSD Library Functions Manual 					   ACL_GET_PERM(3)

NAME
acl_get_perm -- test for a permission in an ACL permission set LIBRARY
Linux Access Control Lists library (libacl, -lacl). SYNOPSIS
#include <sys/types.h> #include <acl/libacl.h> int acl_get_perm(acl_permset_t permset_d, acl_perm_t perm); DESCRIPTION
The acl_get_perm() function tests if the permission specified by the argument perm is contained in the ACL permission set pointed to by the argument permset_d. Any existing descriptors that refer to permset_d continue to refer to that permission set. RETURN VALUE
If successful, the acl_get_perm() function returns 1 if the permission specified by perm is contained in the ACL permission set permset_d, and 0 if the permission is not contained in the permission set. Otherwise, the value -1 is returned and the global variable errno is set to indicate the error. ERRORS
If any of the following conditions occur, the acl_get_perm() function returns -1 and sets errno to the corresponding value: [EINVAL] The argument permset_d is not a valid descriptor for a permission set within an ACL entry. The argument perm is not a valid acl_perm_t value. STANDARDS
This is a non-portable, Linux specific extension to the ACL manipulation functions defined in IEEE Std 1003.1e draft 17 ("POSIX.1e", aban- doned). SEE ALSO
acl_add_perm(3), acl_clear_perms(3), acl_delete_perm(3), acl_get_permset(3), acl_set_permset(3), acl(5) AUTHOR
Written by Andreas Gruenbacher <a.gruenbacher@computer.org>. Linux ACL March 23, 2002 Linux ACL
All times are GMT -4. The time now is 06:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy