Sponsored Content
Full Discussion: problem with find command
Special Forums UNIX and Linux Applications problem with find command Post 302674385 by alister on Thursday 19th of July 2012 01:41:19 PM
Old 07-19-2012
It appears that your find implementation doesn't support the -maxdepth predicate. Fortunately, you can accomplish this task without it:
Code:
find /home/n1013141/vijay -type f -mmin -6 -print -o -type d ! \( -name vijay -exec test {} = /home/n1013141/vijay \; \) -prune

Regards,
Alister

Last edited by alister; 07-19-2012 at 02:49 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Problem with find command

Hi, I am using the find command to remove all the files in a directory ending .NEW and created more than a day ago. The command I am using is: find . -name '*.NEW' -ctime +1 | xargs rm The problem is that it does not work properly. I still have files which were craeted more than a day... (7 Replies)
Discussion started by: nattynatty
7 Replies

2. UNIX for Advanced & Expert Users

Problem with find command in C-shell

when i use the following command find / -name '*.*' -exec grep -il 'text' {} \; I can redirect the errors to /dev/null. This happens only in ksh but not in csh. the 2>/dev/null is not working in csh. Can you some one suggest an alternative for this in csh ? (3 Replies)
Discussion started by: dhanamurthy
3 Replies

3. UNIX for Dummies Questions & Answers

Problem with find command when used with mtime

All, Please find the below comand . I am trying to list the file that has not been accesed is past 14 days . But when you look at the display the directory "crecv1" which has date as today is displayed .. Why it is happening . I send this code instead of ls -ltr as rm -f -r in production... (4 Replies)
Discussion started by: arunkumar_mca
4 Replies

4. 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

5. Shell Programming and Scripting

Find command problem

Hi All, I am using following find command to delete the records older than 7 days but getting missing conjuction error.Kindly suggest: The command is: find <complete_dir_path> \(! -name usr -prune \) -type f -name "*.txt" -mtime +6 -print | xargs rm (11 Replies)
Discussion started by: visingha
11 Replies

6. Shell Programming and Scripting

Problem with find command.

I'm trying to display the full file name (including the full path) and file size of all files whose name (excluding the path) is longer than 10 characters. I came up with find path -type f -name ".{10, }" -printf "%s %p\n", but I'm getting a "find: path: No such file or directory". What's wrong... (2 Replies)
Discussion started by: raidkridley
2 Replies

7. UNIX for Dummies Questions & Answers

problem with output of find command being input to basename command...

Hi, I am triying to make sure that there exists only one file with the pattern abc* in path /path/. This directory is having many huge files. If there is only one file then I have to take its complete name only to use furter in my script. I am planning to do like this: if ; then... (2 Replies)
Discussion started by: new_learner
2 Replies

8. Shell Programming and Scripting

Problem with find command

Hello Friends, When i give the command from path from path /var/tmp/asirohi/jdk/docs:- find /var/tmp/asirohi/jdk/docs/ . -depth -name license_*.html I get the following output:- /var/tmp/asirohi/jdk/docs/zh_Hant/jre/license_zh_Hant.html... (3 Replies)
Discussion started by: asirohi
3 Replies

9. UNIX for Dummies Questions & Answers

Problem with Find command

Hi, I have a script below,which reads dates from No_weekandMonthend_dates.txt performs the copy operation. for i in `cat /tmp/No_weekandMonthend_dates.txt` do cd $Gerenimopath/ZH_LP find . -type f -name "$i_*.txt" -exec cp {} /home/gaddamja/TempLocal \; cd... (2 Replies)
Discussion started by: jagadish_gaddam
2 Replies

10. Shell Programming and Scripting

problem in find command

I am facing problem in find command. I want to read all file names of a directory and write those names in a text file. My script is find /home/Pratik/src -type f -exec basename {} \; >> names.txt The script is working fine and writing all the file names but problem is file names are not... (5 Replies)
Discussion started by: pratikjain998
5 Replies
FTFF(1) 						      General Commands Manual							   FTFF(1)

NAME
ftff - fault tolerant file find utility SYNOPSIS
ftff [-#fFhIpq][-t#][start_directory] file_to_find DESCRIPTION
ftff recursively descends the directory hierarchy and reports all objects in the file system with a name that approximately matches the given filename. ftff achieves fault tolerance by calculating the so called Weighted Levenshtein Distance. The Levenshtein Distance is defined as the minimum number of character insertions, deletions and replacements that transform a string A into a string B. ftff behaves like 'find start_directory -name file_to_find -print' with the following differences: - ftff is fault tolerant - ftff is NOT case sensitive - the level of fault tolerance can be adjusted by specifying the optional parameter tolerance. A tolerance of 0 specifies exact match. OPTIONS
-h Prints a little help/usage information. -f Follow symbolic links on directories. Note: a symbolic link like "somewhere -> .." causes naturally an endless loop. By default ftff does not follow symbolic links to directories. -F Classify the file type by appending a character to each file name. This character is: '*' for regular files that are executable '/' for directories '@' for symbolic links '|' for FIFOs '=' for sockets -p print the actual distance value in front of the filename. This value is equal to the number of insertions, deletions and replace- ments necessary to transform the file that was found into the search key (the file_to_find). -q keep quiet and do not print any warning about non readable directories. -# or -t# Set the fault tolerance level to #. The fault tolerance level is an integer in the range 0-255. It specifies the maximum number of errors permitted in finding the approximate match. The default tolerance is (strlen(searchpattern) - number of wildcards)/6 + 1 -I Do case sensitive search (default is case in-sensitive) file_to_find The filename to search for. '*' and '?' can be used as wildcards. '?' denotes one single character. '*' denotes an arbitrary number of characters. start_directory The directory to start the search. The current directory is the default. The last argument to ftff is not parsed for options as the program needs at least one file-name argument. This means that ftff -x will not complain about a wrong option but search for the file named -x. EXAMPLE
ftff samething This will e.g. find a file called something or sameting or sum-thing or ... To find all files that start with any prefix, have something like IOComm in between and end on a two letter suffix: ftff '*iocomm.??' To find all files that exactly start with the prefix DuPeg: ftff -0 'dupeg*' BUGS
The wildcards '?' and '*' can not be escaped. These characters function always as wildcards. This is however not a big problem since there is normally hardly any file that has these characters in its name. AUTHOR
Guido Socher (guido@linuxfocus.org) SEE ALSO
whichman(1), find(1) Search utilities August 1998 FTFF(1)
All times are GMT -4. The time now is 10:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy