Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Strange result using find command. Post 302935319 by Scott on Saturday 14th of February 2015 11:08:54 PM
Old 02-15-2015
Not sure I could explain it any simpler than the man page on my system does:
Code:
If the mode is preceded by a dash (-), this primary evaluates to true if at least all of the bits in the mode are set in the file's mode bits.

All of the bits (644 - 110100100) are set in 766 (111110110)

Code:
File  111110110  766
Find  110100100  644
=     110100100  644

This User Gave Thanks to Scott For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

find command not returning any result

I am looking for all the header files (*.h).. which as per documentation of the UNIX system shouldbe there. I am using find / -name *.h -print But it does't give anything. My question is under what condition the "find" condition will fail to find the file? What is the work around. ... (4 Replies)
Discussion started by: rraajjiibb
4 Replies

2. Windows & DOS: Issues & Discussions

Setting a variable to result of FIND command

I am working on a batch script where a filter is placed on a directory, and the files that come out of that filter have to be copied into another directory. More specifically, I am trying to set the results of a FIND command to a variable, so that I may access this variable / file later. The... (2 Replies)
Discussion started by: JP Favara
2 Replies

3. Shell Programming and Scripting

sh : Problem with the result of a find command

Hi I'm working on solaris and I'm trying to run a script. The part listed here does not work properly, the result of the find command is not in the output file /tmp/result (I've checked the find command , executing the shell with sh -x , it seems correct). It seems like I've lost the standard... (4 Replies)
Discussion started by: frenchwill
4 Replies

4. UNIX for Dummies Questions & Answers

Find command - result order

Hi! Could you please explain why the result order isn't in reverse time order as it is requestet by "xargs ls -ltr" command (ksh shell)? There are about 5000 files in dir. $ find . -name "*201010*" -print |xargs ls -ltr |tail -rw-r--r-- 1 oracle oinstall 54326 Nov 25 20:32... (2 Replies)
Discussion started by: laki47
2 Replies

5. Shell Programming and Scripting

Strange result

Hi, I have following codes which looks ok: $ string1="123456789 abc2" $ string2="abc" $ position_of_string2=`expr index "$string1" "$string2"` $ echo $position_of_string2 $ 11however, when string2="abc2", it gives me the following result: $ string1="123456789 abc2" $... (5 Replies)
Discussion started by: littlewenwen
5 Replies

6. Shell Programming and Scripting

Strange behavior of find and rm command

Hi I run the below command to find and delete *.xml files 90 or more days old. find . -type f -name '*.xml' -mtime +90 -exec rm {} \; find: stat() error ./Hello/2014_EMPTY.xml: No such file or directory ./Hello/2014_EMPTY_8011.xml: No such file or directory ..... .... If the file... (10 Replies)
Discussion started by: mohtashims
10 Replies

7. UNIX for Dummies Questions & Answers

Listing only the files under a directory from the result of find command

Hi, I have a main folder 'home'. Lets say there is a folder 'bin' under 'home'. I want to check the list of files under subdirectories present under the /bin directory created in the last 24 hours. I am using the following find command under home/bin directory: find . -mtime -1 -print ... (3 Replies)
Discussion started by: DJose
3 Replies

8. Shell Programming and Scripting

Unexplained result of 'find' command

Given this bit of script: retprd=$1 find ${extrnllogdir} -name "*.log" -mtime +$retprd -exec ls -l {} \; >> $logfile produces this (with 'set -x') ++ find /xfers/oracle/dw/data -name '*.log' -mtime +60 -exec ls -l '{}' ';' find: /xfers/oracle/dw/data/cron: Permission denied Where is he... (5 Replies)
Discussion started by: edstevens
5 Replies

9. Shell Programming and Scripting

Find with rm command gives strange results

I want to remove any files that are older than 2 days from a directory. It deletes those files. Then it comes back with a message it is a directory. What am I doing wrong here? + find /mydir -mtime +2 -exec rm -f '{}' ';' rm: /mydir is a directory (2 Replies)
Discussion started by: jtamminen
2 Replies

10. Shell Programming and Scripting

Linux find command seems to not transmit all the result to the '-exec command'

Hello. From a script, a command for a test is use : find /home/user_install -maxdepth 1 -type f -newer /tmp/000_skel_file_deb ! -newer /tmp/000_skel_file_end -name '.bashrc' -o -name '.profile' -o -name '.gtkrc-2.0' -o -name '.i18n' -o -name '.inputrc' Tha command... (3 Replies)
Discussion started by: jcdole
3 Replies
ACL_ADD_PERM(3) 					   BSD Library Functions Manual 					   ACL_ADD_PERM(3)

NAME
acl_add_perm -- add permissions to a permission set LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sys/types.h> #include <sys/acl.h> int acl_add_perm(acl_permset_t permset_d, acl_perm_t perm); DESCRIPTION
The acl_add_perm() function is a POSIX.1e call that adds the permission contained in perm to the permission set permset_d. Note: it is not considered an error to attempt to add permissions that already exist in the permission set. RETURN VALUES
The acl_add_perm() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error. ERRORS
The acl_add_perm() function fails if: [EINVAL] Argument permset_d is not a valid descriptor for a permission set within an ACL entry. Argument perm does not contain a valid acl_perm_t value. SEE ALSO
acl(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 Fulhaber BSD
March 10, 2001 BSD
All times are GMT -4. The time now is 03:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy