The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Find, make and move file based on username Helmi UNIX for Dummies Questions & Answers 5 04-19-2007 06:49 PM
how to start a process and make it sleep for 5 mins and then kill that process shrao Shell Programming and Scripting 6 03-27-2007 09:54 AM
how to find the chid process id from given parent process id guhas Shell Programming and Scripting 3 10-13-2005 05:13 AM
How would I make a find command NOT show the path of a file? LordJezo Shell Programming and Scripting 1 10-01-2004 03:01 AM
how to make a current running process ignore SIGHUP signal? stevensxiao UNIX for Advanced & Expert Users 3 12-02-2003 10:35 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 06-01-2006
Registered User
 

Join Date: Apr 2006
Posts: 24
Is there a way to make this find job run as one process, more efficiently?

Hi, unixers, I'm doing something like

find -type f -name '*.gif' | xargs rm &
find -type f -user root | xargs chown idealo &
wait
#do more stuff

on a very large dir. I'm thinking this would be more efficient if it was running as a single process that did one thing for the first condition, another thing for the other condition. I could do this with perl (File::Find), but I'm wondering if there's an elegant solution with bash.

thanks for any insight!
Reply With Quote
Forum Sponsor
  #2  
Old 06-01-2006
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 4,297
You might be wrong in your thinking.

By creating two sub-proceses you are probably making the overall time of the job shorter. This is because both of those commands will spend time wating on disk i/o's to complete. When one process is waiting for i/o completion the other one can run.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 12:25 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0