Sponsored Content
Full Discussion: Nested find cmd
Top Forums Shell Programming and Scripting Nested find cmd Post 302505693 by Corona688 on Thursday 17th of March 2011 03:16:15 PM
Old 03-17-2011
That's a useless use of backticks, whenever you have "for x in `something`" it's often better to do "something | while read x".

Code:
find /opt/sample -type d -name Logs |
while read DIR
do
        find "$DIR" -type f -name "*.log" -atime +6
done

should print the matching files.

Are you sure atime is what you want? That's when files were last accessed, not when last modified, and many systems don't keep atimes these days.
This User Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find cmd not working as expected

Hi, i wan to search the file starting with Admin into the directory Output. I am running below command: find /appl/Output -name "Admin*" -prune but this command is going into the sub directories present under output. I do not want to search under sub directories. Any help will be highly... (6 Replies)
Discussion started by: Vishal123
6 Replies

2. Solaris

Find cmd working in Linux and not in SunSolaris 5.8

find . -type f -mtime -1 -ls command not working in sun solaris 5.8 (4 Replies)
Discussion started by: navjotbaweja
4 Replies

3. Shell Programming and Scripting

using find cmd to find certain files

i have a list of files below: rwxrwxrwx 1 pipe pipe 180 Mar 4 22:47 del_0n_Date -rwxrwxrwx 1 pipe pipe 472 Mar 4 22:58 mail_Check -rw-r--r-- 1 pipe pipe 92 Mar 4 22:58 minfo.txt -rwxrwxrwx 1 pipe pipe 609 Mar 5 05:12... (6 Replies)
Discussion started by: ali560045
6 Replies

4. Shell Programming and Scripting

how to find status of last executed cmd in perl?

In shell we can find the status of last executed command by $? In perl what is the command to find the status of last executed command... Can any one please say??????????????? Thanks, Prabhu (1 Reply)
Discussion started by: prsampath
1 Replies

5. Shell Programming and Scripting

Find cmd not working correctly in script

I am trying to copy 2 types of files so I can archive them. I tested with a set of commands: touch -t $(date -d "-60 day" +%Y%m%d) WORKDIR/REF find TARGETDIR/ -type f -maxdepth 1 -iname \*.out\* -or -iname \*.log\* ! -newer WORKDIR/REF -exec ls -l {} \; This correctly lists any files in the... (2 Replies)
Discussion started by: prismtx
2 Replies

6. Shell Programming and Scripting

date with find cmd

Hi for today i have 10 files, in that i need search some values how can i write a find cmd with perticular date thanks SAIC (4 Replies)
Discussion started by: saic
4 Replies

7. Shell Programming and Scripting

How to link lsof and find cmd?

Hi All, My target is to find the biggest files opened by any process and from that i have to find process id and the corresponding file also to avoid file system being hung-up. Finding the process id: is to kill the process Finding the biggest file: is to remove the file To get the process... (0 Replies)
Discussion started by: Arunprasad
0 Replies

8. Shell Programming and Scripting

find cmd works different on cron job ?

/usr/bin/find $SEARCH_DIR -daystart \( \( -name 'KI*' -a -name '*.csv' \) -o -name '*_xyz_*' \) -mtime $DAYS_AGO -printf %f -printf "\n" | sort -r > $FILES The above command gives different results when run on a cron job. When run manually the result is accurate. (2 Replies)
Discussion started by: nuthalapati
2 Replies

9. UNIX for Dummies Questions & Answers

Help with the find cmd

Hello, I'm having a trouble with the find cmd. I would like to find all the java versions on my systems. I have solaris 9 & 10 RHEL and SUSIE. java -version doesn't give all the versions on the server. So I am trying to use the find command to find them all find / -name java I would... (7 Replies)
Discussion started by: bitlord
7 Replies

10. UNIX for Advanced & Expert Users

Find cmd and sym links

Hi. Can somebody tell me if there's a way of creating a symbolic link from a directory on one filesystem to that on another that will allow a find command that doesn't use the -L param to locate a particular file under that new 'linked' dir. With a normal sym link the find command on that... (6 Replies)
Discussion started by: user052009
6 Replies
ARORA-CACHEINFO(1)					      General Commands Manual						ARORA-CACHEINFO(1)

NAME
arora-cacheinfo - a tool for extracting files and metadata out of Arora cache files. SYNOPSIS
arora-cacheinfo [-o cachefile] [file | url] DESCRIPTION
Arora-cacheinfo is a tool for extracting files and displaying metadata out of an Arora cache files that are stored on the disk. Every cache file contains both the cached file (sometimes compressed) and metadata associated with it such as expiration date. Cache files names always include the md5sum of the url and passing a url to arora-cacheinfo.1 will automatically determine the correct matching cache file name. OPTIONS
-o cachefile Write the cached file if it exists to cachefile file Specify the file to read from. url Specify the url from which to compute the file to read from. BUGS Please report bugs to http://code.google.com/p/arora/issues/list. AUTHOR
The author of arora-cacheinfo is Benjamin C. Meyer <ben@meyerhome.net>. This manual page was written by Benjamin C. Meyer <ben@meyerhome.net> Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. July 2009 ARORA-CACHEINFO(1)
All times are GMT -4. The time now is 06:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy