Search Results

Search: Posts Made By: rsheikh
9,781
Posted By shamrock
How about nesting it in a single line... find...
How about nesting it in a single line...
find /opt/sample -type d -name "Logs" -exec find {} -type f -name "*.log" -atime +6 \; | xargs rm
9,781
Posted By Corona688
I think that means xargs didn't find any...
I think that means xargs didn't find any arguments and just ran ls -l by itself. -n999 doesn't actually stop this from happening, it only sets a maximum number of args, so seems a bit pointless.
...
9,781
Posted By DGPickett
Well, no space after #!, you truncate the output...
Well, no space after #!, you truncate the output for every DIR, xargs will fire for 0 found, so try -n999, and while read DIR' would be lower latency:
#!/bin/sh
out=/usr/tmp/ct

find /opt/sample...
9,781
Posted By Corona688
That's a useless use of backticks...
That's a useless use of backticks (http://partmaps.org/era/unix/award.html), whenever you have "for x in `something`" it's often better to do "something | while read x".

find /opt/sample -type d...
15,698
Posted By Chubler_XL
Sounds like you are getting the manual entry on...
Sounds like you are getting the manual entry on the C function wait if manual entry has (3) or (3C) following it that is the C library routine not the OS command which has (1).

Wait is a builtin...
Showing results 1 to 5 of 5

 
All times are GMT -4. The time now is 10:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy