Sponsored Content
Top Forums Shell Programming and Scripting Understand the importance of -depth option in find command. Post 302914678 by Girish19 on Wednesday 27th of August 2014 08:55:57 AM
Old 08-27-2014
Question Understand the importance of -depth option in find command.

Hi All,

Can you please help me in understanding the importance of -depth of find.

I am trying to execute below code.
Code:
find . -mtime +5  -name  "*"  -depth -exec ls -l {} \;

But it is throwing below error.
Code:
find: warning: you have specified the -depth option after a non-option argument -mtime, but options are not positional
(-depth affects tests specified before it as well as those specified after it). 
Please specify options before other arguments.

From the error I can understand that there is problem with the position of -depth

But I just want to know the concept in this.

Kindly help me with your suggestions.

Last edited by rbatte1; 08-27-2014 at 12:24 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Find command -size option limitation ?

Hi All, I ran code in test environment to find the files more than 1TB given below is a snippet from code: FILE_SYSTEM=/home/arun MAX_FILE_LIMIT=1099511627776 find $FILE_SYSTEM -type f -size +"$MAX_FILE_LIMIT"c -ls -xdev 2>/dev/null | while read fname do echo "File larger than... (3 Replies)
Discussion started by: Arunprasad
3 Replies

2. UNIX for Dummies Questions & Answers

help me out with find command , -prune option

Hi , Kindly help me out .:) i want to find only the file t4 in directory t3. i am in dir t . the tree is as follows. if i give, find . o/p is . ./t4 ./t1 ./t1/t2 ./t1/t2/t3 ./t1/t2/t3/t4 ./t1/t2/t4 ./t1/t4 directories are like t/t1/t2/t3 and each directory has file t4. my... (7 Replies)
Discussion started by: bhuvaneshlal
7 Replies

3. Shell Programming and Scripting

help with find command and prune option

Hi I have a directory say mydir and inside it there are many files and subdirectories and also a directory called lost+found owned by root user I want to print all files directories and subdirectorres from my directory using find command except lost+found If i do find . \( -name... (3 Replies)
Discussion started by: xiamin
3 Replies

4. Shell Programming and Scripting

daystart option not working in find command

Hi, I am trying to list all the files created / modified today in a directory. With reference to this thread, https://www.unix.com/shell-programming-scripting/20324-capture-all-today-files.html I have used the below command to list all the files modified today. find . -daystart -type f... (8 Replies)
Discussion started by: arunkumarmc
8 Replies

5. HP-UX

Understand option in vparecreate

hi every body i want to know this option what it means vparcreate -g ILM:128:y -g CLM:128:y (2 Replies)
Discussion started by: maxim42
2 Replies

6. Shell Programming and Scripting

complicated exclude option in find command

Hi all, In a directory, I have many video files. Example : As you can see, some of the video files come with a .aspx file (wich means the video is actually being uploaded and not entirely written on the FS) I try to write a bash script that would find all video files in the ... (1 Reply)
Discussion started by: gniagnia
1 Replies

7. Shell Programming and Scripting

Please suggest me a better option than FIND command

Hi All, Could you please help me in searching files in a better way satisfying the below conditions I want to search files in a path whose access time is more than 5min and less than 60 min and whose Byte size is greater than zero For this, i am using the below command, but it is... (2 Replies)
Discussion started by: sparks
2 Replies

8. Shell Programming and Scripting

Confusing find command option

Hi, I am a little bit confusing of using find command. Actually, I am planning to delete the files whatever the files are existing in the day before yesterday. So, I am writing the command like this. find . -name "*.txt" -ctime -2 { here I am confusing, if I will use +2 or +1 also I am... (5 Replies)
Discussion started by: nagraju.allam
5 Replies

9. UNIX for Dummies Questions & Answers

cmd find: exclude directory when using option -depth

hello, i want to use "-depth" in command "find" and want to exclude a directory. the find command should work in HP-UX and Linux. i see in the find man page: -prune If -depth is not given, true; do not descend the current directory. If -depth is given, false; no effect. -depth... (3 Replies)
Discussion started by: bora99
3 Replies

10. Shell Programming and Scripting

Variable inside -name option for find command

Hi, I am not able to get output for find command if there are variables defined inside -name option . Please check below example 1) ###VARIABLES DEFINED process="fast" temperature="125c" voltage="0p935v" 2) I don't get output for below find command find -L <PATH> -type f \( -name... (2 Replies)
Discussion started by: gujrathinr
2 Replies
GLDEPTHFUNC(3G) 														   GLDEPTHFUNC(3G)

NAME
glDepthFunc - specify the value used for depth buffer comparisons C SPECIFICATION
void glDepthFunc( GLenum func ) PARAMETERS
func Specifies the depth comparison function. Symbolic constants GL_NEVER, GL_LESS, GL_EQUAL, GL_LEQUAL, GL_GREATER, GL_NOTEQUAL, GL_GEQUAL, and GL_ALWAYS are accepted. The initial value is GL_LESS. DESCRIPTION
glDepthFunc specifies the function used to compare each incoming pixel depth value with the depth value present in the depth buffer. The comparison is performed only if depth testing is enabled. (See glEnable and glDisable of GL_DEPTH_TEST.) func specifies the conditions under which the pixel will be drawn. The comparison functions are as follows: GL_NEVER Never passes. GL_LESS Passes if the incoming depth value is less than the stored depth value. GL_EQUAL Passes if the incoming depth value is equal to the stored depth value. GL_LEQUAL Passes if the incoming depth value is less than or equal to the stored depth value. GL_GREATER Passes if the incoming depth value is greater than the stored depth value. GL_NOTEQUAL Passes if the incoming depth value is not equal to the stored depth value. GL_GEQUAL Passes if the incoming depth value is greater than or equal to the stored depth value. GL_ALWAYS Always passes. The initial value of func is GL_LESS. Initially, depth testing is disabled. Even if the depth buffer exists and the depth mask is non- zero, the depth buffer is not updated if the depth test is disabled. ERRORS
GL_INVALID_ENUM is generated if func is not an accepted value. GL_INVALID_OPERATION is generated if glDepthFunc is executed between the execution of glBegin and the corresponding execution of glEnd. ASSOCIATED GETS
glGet with argument GL_DEPTH_FUNC glIsEnabled with argument GL_DEPTH_TEST SEE ALSO
glDepthRange, glEnable, glPolygonOffset GLDEPTHFUNC(3G)
All times are GMT -4. The time now is 05:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy