Threaded 'find' utility


 
Thread Tools Search this Thread
Top Forums Programming Threaded 'find' utility
# 1  
Old 10-24-2004
Threaded 'find' utility

I need to modify my version of find in unix and get it to create and use two POSIX threads to carry out concurrent finding operations.

How do i get about doing this>?

If anyone could help me it would be much appreciated.

Thanx

Mariuca
# 2  
Old 10-27-2004
Smilie I am not quite sure what you are asking
but if you want two concurrent threads on the find command at the same time from what I understand you would use something like this
find -follow -mtime 0 -o -mtime -5 f -fls file1 -printf "%i %c%p\n" > file2
the syntax for find and printf using %? is different and listed in your man pages under printf fprintf print0 fprint0 and print this includes the type of output in the listing, the time, and the type of output of the names of the files listed.. in the example I gave you -fls will redirect to file1 and -printf will redirect to file2 if you want a redirect and and and stndout use printf the same way without redirecting to file2.. this way you have a specific type of listing in file1 and your own defined stndout on the screen from printf...
i for inode.... c for last change time with day time and date p for name of files or f for name of files without directories listed before..etc etc etc
hope that helps ... try man find for more information
moxxx68Smilie

Last edited by moxxx68; 10-27-2004 at 08:50 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

UNIX utility to find difference in folder, file and contents of file against a base version

Hi, I am trying to find out whether there are any Unix utilities that compares folders, files and contents within the file and provides a comprehensive report. The comparison can be against base version of a folder and file with content. Can you please let me know of such a utility? Thanks,... (6 Replies)
Discussion started by: Sripathi_ks
6 Replies

2. Shell Programming and Scripting

behavior of find utility's -mtime -7 primary

Can I ask a question not related to original question. I have this below command running on a directory which contains thousands of files. This command runs for 5 minutes. Any files received in folder1 during the execution of command is getting moved, even though that file is just received and it's... (6 Replies)
Discussion started by: Super123
6 Replies

3. AIX

Help to find isutf8 utility for AIX 6.1

Hello everyone, I need to validate the file format for the UTF-8 standard. I know that "isutf8"utility is a part of "moreutils" pkg, I was able to find this package for the Linux but my environment in the AIX 6.1. I would be greatly appreciate your suggestion to my search. I am not familiar with... (5 Replies)
Discussion started by: Nadya Chipova
5 Replies

4. Shell Programming and Scripting

Question on Find Utility

Hi Guys, Do you know how can I find files with modificatioin time less than 30 MINUTES using the find utility? Or if u have any other mechanism to find it using script, I'll appreciate it. Thanks! (5 Replies)
Discussion started by: marlonus999
5 Replies

5. Programming

help me out with my threaded c++ mudbase - c++, pthread_cond_wait

hello, in my free time i am writing on a c++ mud codebase, a while ago i decided that i would move to pthreads, so i could make use of smp. now i have a problem which i just cant fix - for weeks now. i have a main thread which spawns my threads, as soon as spawned they get a pthread_cond_wait, so... (4 Replies)
Discussion started by: sonicx
4 Replies

6. Shell Programming and Scripting

options in FIND utility

hi folks, I want to select all files older than 13 days from a specified directory for that i used find /home/amar -name '*.*' -mtime 13 but it gives me all the files from subdirectories also, I dont want that I want files only from /home/amar and not from /home/amar/abc/.. which... (8 Replies)
Discussion started by: amarnath
8 Replies

7. UNIX for Dummies Questions & Answers

can't find my NEDIT utility after shell change

Hello, My System Admin. just switched me from KSH to BASH and something happened to my "nedit" utility! Does anyone know how to reactivate nedit by anychance? Thanks very much! BobK (2 Replies)
Discussion started by: bobk544
2 Replies

8. Shell Programming and Scripting

Compound command with 'find' utility?

I'm trying to write a script using the 'find' command and it's -exec option to run a compound command against the files found. Example: find . -name "*.conf" -exec cat {} | grep "#" > /tmp/comments.list \; Of course the above doesn't work. So I experimented for a bit to see if there was... (6 Replies)
Discussion started by: deckard
6 Replies

9. Programming

threaded merge sort help

I am working on a merge sort of two files of integers, and am fuzzy on some of the logic\syntax. I need two threads, each of which will open a file, read its contents into an array, and then sort the array using qsort. One thread will operate on file f1.dat(10000 numbers) and leave its sorted... (0 Replies)
Discussion started by: AusTex
0 Replies

10. UNIX for Dummies Questions & Answers

Threaded Discussions for Webpages

Dear All, I run a website for a non-profit. Does anyone know where I can get free or cheap software to run threaded discussions for our website? Our website is obviously running off a unix platform. Thanks (4 Replies)
Discussion started by: evertk
4 Replies
Login or Register to Ask a Question