Sponsored Content
Full Discussion: Help with find -perm option
Top Forums Shell Programming and Scripting Help with find -perm option Post 302514119 by stevensw on Thursday 14th of April 2011 10:22:45 PM
Old 04-14-2011
Any way to do it specifying -perm only once?

What I gave was a simple example, of course if you had more wildcards things would get uglier. I'd like to not have to specify -perm a bunch of times if possible.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

find -perm query

I was going through a find tutorial and just couldn't get it...can someone explain it like he/she would explain a brain damaged dodo? "find allows you to specify a pattern that can be bit-wise ANDed with the permissions of the file. Simply put a minus sign before the octal value. The group write... (1 Reply)
Discussion started by: napolayan
1 Replies

2. Shell Programming and Scripting

Wild card in find perm

Hi, Is there a way to use find command to list the directories for certain permissions. I know we can use find . -type d -perm nnn, where nnn is the permission number . However I wold like to know if I wanna search for wild card permissions i.e 75* / 7* / 55* , as i do not know the actual... (1 Reply)
Discussion started by: braindrain
1 Replies

3. UNIX for Dummies Questions & Answers

Find and EXECDIR option

Hello, I was reading the man pages of find and it says that the -exec option should not be used. I read the following about the recommended option, -execdir: -execdir command {} + Like -exec, but the specified command is run from the subdirec‐ tory containing... (1 Reply)
Discussion started by: mojoman
1 Replies

4. Shell Programming and Scripting

find with prune option

Hi, I want to list files only from the current dir and its child dir (not from child's child dir). i have the following files, ./ABC/1.log ./ABC/2.log ./ABC/ABC1/A.log ./ABC/ABC1/B.log ./ABC/ABC1/XYZ/A1.log ./ABC/ABC1/XYZ/A2.log Here i want to list only the log file from current... (1 Reply)
Discussion started by: apsprabhu
1 Replies

5. Shell Programming and Scripting

Find in Bash with -a option

Hi, The proble is below: Assume i have files starting from "process" then date/time then ".log". ex . process.20100504092942.log process.20100503152213.log process.20100430144217.log process.20100429153644.log process.20100428121200.log process.20100427130746.log... (2 Replies)
Discussion started by: meetvipin
2 Replies

6. Shell Programming and Scripting

recently introduced to the newer option for find...does an older option exist?

To find all the files in your home directory that have been edited in some way since the last tar file, use this command: find . -newer backup.tar.gz Is anyone familiar with an older solution? looking to identify files older then 15mins across several directories. thanks, manny (2 Replies)
Discussion started by: mr_manny
2 Replies

7. Shell Programming and Scripting

find -regex option

I'm trying to use regular expression arguments as variables. I have to surround the regular expression with double quotes or else it automatically expands that regular expression to whatever is in that directory. Unfortunately when I run 'find' it further surrounds the double quotes with single... (6 Replies)
Discussion started by: stevensw
6 Replies

8. UNIX for Dummies Questions & Answers

find with prune option help needed

Hello, I am using ksh93 (/usr/dt/bin/dtksh) on Solaris and am stuck when trying to use find with the -prune option. I need to search a directory (supplied in a variable) for files matching a certain pattern, but ignore any sub-directories. I have tried: find ${full_path_to_dir_to_search}... (9 Replies)
Discussion started by: gary_w
9 Replies

9. UNIX for Dummies Questions & Answers

find with mtime option

Hi, Please give me more details on the following examples, about "mtime" option. When I try this, I could not get the expected output, please help. find . -mtime -1 -print find . -mtime +1 -print find . -mtime 1 -print How do I get the files modified between two dates, say from... (4 Replies)
Discussion started by: Dev_Dev
4 Replies

10. UNIX for Dummies Questions & Answers

How to find directory listing from root to all files in tree format with details of perm/own/grp?

Hi, My apologies if my query is already available on this forum but I am new and could not find. I need a script to list all directories/sub directories and files with permissions/groups/owners. The script would run from home directory and should capture every directory. How do I do this? ... (4 Replies)
Discussion started by: 8709711
4 Replies
SHM_ATTACH(3)								 1							     SHM_ATTACH(3)

shm_attach - Creates or open a shared memory segment

SYNOPSIS
resource shm_attach (int $key, [int $memsize], [int $perm = 0666]) DESCRIPTION
shm_attach(3) returns an id that can be used to access the System V shared memory with the given $key, the first call creates the shared memory segment with $memsize and the optional perm-bits $perm. A second call to shm_attach(3) for the same $key will return a different shared memory identifier, but both identifiers access the same underlying shared memory. $memsize and $perm will be ignored. PARAMETERS
o $key - A numeric shared memory segment ID o $memsize - The memory size. If not provided, default to the sysvshm.init_mem in the php.ini, otherwise 10000 bytes. o $perm - The optional permission bits. Default to 0666. RETURN VALUES
Returns a shared memory segment identifier. CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 5.3.0 | | | | | | | This function now returns a resource instead of | | | an integer. | | | | +--------+---------------------------------------------------+ NOTES
Note This function used to return an integer value prior to PHP 5.3.0. To achieve the same value in a portable manner, the return value can be cast to an integer like: Example #1 <?php // Create a temporary file and return its path $tmp = tempnam('/tmp', 'PHP'); // Get the file token key $key = ftok($tmp, 'a'); // Attach the SHM resource, notice the cast afterwards $id = shm_attach($key); if ($id === false) { die('Unable to create the shared memory segment'); } // Cast to integer, since prior to PHP 5.3.0 the resource id // is returned which can be exposed when casting a resource // to an integer $id = (integer) $id; ?> SEE ALSO
shm_detach(3), ftok(3). PHP Documentation Group SHM_ATTACH(3)
All times are GMT -4. The time now is 10:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy