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_NP(3)					   BSD Library Functions Manual 					ACL_GET_PERM_NP(3)

NAME
acl_get_perm_np -- check if a permission is set in a permission set LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sys/types.h> #include <sys/acl.h> int acl_get_perm_np(acl_permset_t permset_d, acl_perm_t perm); DESCRIPTION
The acl_get_perm_np() function is a non-portable function that checks if a permission is set in a permission set. RETURN VALUES
If the permission in perm is set in the permission set permset_d, a value of 1 is returned, otherwise a value of 0 is returned. ERRORS
If any of the following conditions occur, the acl_get_perm_np() function will return a value of -1 and set global variable errno to the cor- responding value: [EINVAL] Argument perm does not contain a valid ACL permission or argument permset_d is not a valid ACL permset. SEE ALSO
acl(3), acl_add_perm(3), acl_clear_perms(3), acl_delete_perm(3), acl_get_permset(3), acl_set_permset(3), posix1e(3) STANDARDS
POSIX.1e is described in IEEE POSIX.1e draft 17. AUTHORS
Michael Smith Chris D. Faulhaber BSD
April 10, 2001 BSD
All times are GMT -4. The time now is 06:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy