Sponsored Content
Top Forums Shell Programming and Scripting find command not searching path when -newer specified Post 302657779 by vbe on Monday 18th of June 2012 11:03:36 AM
Old 06-18-2012
Quote:
Find only searches the current directory, not the path specified:
Not really: It searches in the given path but the file given as parameter if no path is given is understood as being in current path, since it cannot find the "newer" file it complains:
Code:
find: S0002166.LOG: No such file or directory

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Find files newer than...

Is there a way to use the find command to locate files newer than a specific date? Thanks! --Alex (4 Replies)
Discussion started by: vertigo23
4 Replies

2. Shell Programming and Scripting

Problem with find ! -newer

Hi, I would like to find if a file called test.log is older than 10 min. So i wrote : #!/usr/bin/ksh FICLOG="/home/uuu/result_test.log" FIC="/home/uuu/test.log" touch -t `perl -e 'use POSIX qw(strftime); printf("%s\n",strftime("%m%d%H%M",localtime(time-3600*0.17)));'`... (3 Replies)
Discussion started by: dbfree
3 Replies

3. UNIX for Dummies Questions & Answers

command to find the path of a file

What is the command to find the path of a file if we know the file name and the root directory where the file resides.. For eg. if a file abc.dat resides in /home/mydir/myfiles/. I am looking for a command which will be fired from / directory, takes abc.dat as input and display the path of... (3 Replies)
Discussion started by: abhilashnair
3 Replies

4. UNIX for Dummies Questions & Answers

create PATH from find command output

I'm trying to autogenerate a PATH variable from the output of a find command as follows: PATH=`find $dir -name "*.jar" | sed 's/$/:/'` The output looks similar like this if I echo it: PATH=/path/to/1.jar: /path/to/2.jar: /path/to/3.jar: I want the path to be on one line. I'm on... (3 Replies)
Discussion started by: rein
3 Replies

5. UNIX for Advanced & Expert Users

find -cmin or fin -newer

I am running SUSE/8 and SUSE/9 on a high end server (4 CPU, 8G RAM etc) I have a huge directory structure with over 4million files in it. I have find the files that are modified (created, modified, renamed etc etc) in the last 10 minutes periodically. I have tried "find -cmin -10" and "find... (2 Replies)
Discussion started by: xxxyyyy
2 Replies

6. Shell Programming and Scripting

Problems with find's -newer Flag

I am writing a script that looks in a reports directory, copies a specified script to a working folder, copies some data files into the working folder, runs the report, zips the new files, then uploads them. Right now to determine what files to zip (as I don't know how many report files there... (6 Replies)
Discussion started by: droppedonjapan
6 Replies

7. UNIX for Dummies Questions & Answers

command to find the absolute path

i understand by using the pwd command we get the present working directory. which command is used to find absolute path from home directory to root.. What is absolute path to your and root user's home directory.:confused::confused::confused: (2 Replies)
Discussion started by: shaziafathima
2 Replies

8. UNIX for Dummies Questions & Answers

Find files newer than x days

We had an arrant rsync run and started copying over new files from one system to another. Although this is what we will want to do at some point, for now, we want to maintain the system as it was a few days ago. I am looking for a script that will find files that are newer than x days. ... (5 Replies)
Discussion started by: Leyva62
5 Replies

9. UNIX for Dummies Questions & Answers

Find command not searching recursively

I'm searching for particular scripts that contain pattern "BASIS" so I used the following command: find . -type f -print | xargs grep "BASIS" or find . -type f -exec grep "BASIS" {} \; However, I found out that the find command in the UNIX box that I'm working on doesn't find files... (6 Replies)
Discussion started by: The Gamemaster
6 Replies

10. Red Hat

How to find the path of a command?

Hi guys. I want to know the path of a command. I tried "which" command also . But no luck. Please tell me how to find and update the correct path of the command. Here I'm unable to find the path of ext2online command # resize2fs /dev/vg01/lvora_backup resize2fs 1.39 (29-May-2006)... (3 Replies)
Discussion started by: vamshigvk475
3 Replies
CPANPLUS::inc(3pm)					 Perl Programmers Reference Guide					CPANPLUS::inc(3pm)

NAME
CPANPLUS::inc DESCRIPTION
OBSOLETE NAME
CPANPLUS::inc - runtime inclusion of privately bundled modules SYNOPSIS
### set up CPANPLUS::inc to do it's thing ### BEGIN { use CPANPLUS::inc }; ### enable debugging ### use CPANPLUS::inc qw[DEBUG]; DESCRIPTION
This module enables the use of the bundled modules in the "CPANPLUS/inc" directory of this package. These modules are bundled to make sure "CPANPLUS" is able to bootstrap itself. It will do the following things: Put a coderef at the beginning of @INC This allows us to decide which module to load, and where to find it. For details on what we do, see the "INTERESTING MODULES" section below. Also see the "CAVEATS" section. Add the full path to the "CPANPLUS/inc" directory to "$ENV{PERL5LIB". This allows us to find our bundled modules even if we spawn off a new process. Although it's not able to do the selective loading as the coderef in @INC could, it's a good fallback. METHODS
CPANPLUS::inc->inc_path() Returns the full path to the "CPANPLUS/inc" directory. CPANPLUS::inc->my_path() Returns the full path to be added to @INC to load "CPANPLUS::inc" from. CPANPLUS::inc->installer_path() Returns the full path to the "CPANPLUS/inc/installers" directory. CPANPLUS::inc->original_perl5lib Returns the value of $ENV{PERL5LIB} the way it was when "CPANPLUS::inc" got loaded. CPANPLUS::inc->original_perl5opt Returns the value of $ENV{PERL5OPT} the way it was when "CPANPLUS::inc" got loaded. CPANPLUS::inc->original_inc Returns the value of @INC the way it was when "CPANPLUS::inc" got loaded. CPANPLUS::inc->limited_perl5opt(@modules); Returns a string you can assign to $ENV{PERL5OPT} to have a limited include facility from "CPANPLUS::inc". It will roughly look like: -I/path/to/cpanplus/inc -MCPANPLUS::inc=module1,module2 CPANPLUS::inc->interesting_modules() Returns a hashref with modules we're interested in, and the minimum version we need to find. It would looks something like this: { File::Fetch => 0.06, IPC::Cmd => 0.22, .... } INTERESTING MODULES
"CPANPLUS::inc" doesn't even bother to try find and find a module it's not interested in. A list of interesting modules can be obtained using the "interesting_modules" method described above. Note that all subclassed modules of an "interesting module" will also be attempted to be loaded, but a version will not be checked. When it however does encounter a module it is interested in, it will do the following things: Loop over your @INC And for every directory it finds there (skipping all non directories -- see the "CAVEATS" section), see if the module requested can be found there. Check the version on every suitable module found in @INC After a list of modules has been gathered, the version of each of them is checked to find the one with the highest version, and return that as the module to "use". This enables us to use a recent enough version from our own bundled modules, but also to use a newer module found in your path instead, if it is present. Thus having access to bugfixed versions as they are released. If for some reason no satisfactory version could be found, a warning will be emitted. See the "DEBUG" section for more details on how to find out exactly what "CPANPLUS::inc" is doing. DEBUG
Since this module does "Clever Things" to your search path, it might be nice sometimes to figure out what it's doing, if things don't work as expected. You can enable a debug trace by calling the module like this: use CPANPLUS::inc 'DEBUG'; This will show you what "CPANPLUS::inc" is doing, which might look something like this: CPANPLUS::inc: Found match for 'Params::Check' in '/opt/lib/perl5/site_perl/5.8.3' with version '0.07' CPANPLUS::inc: Found match for 'Params::Check' in '/my/private/lib/CPANPLUS/inc' with version '0.21' CPANPLUS::inc: Best match for 'Params::Check' is found in '/my/private/lib/CPANPLUS/inc' with version '0.21' CAVEATS
This module has 2 major caveats, that could lead to unexpected behaviour. But currently I don't know how to fix them, Suggestions are much welcomed. On multiple "use lib" calls, our coderef may not be the first in @INC If this happens, although unlikely in most situations and not happening when calling the shell directly, this could mean that a lower (too low) versioned module is loaded, which might cause failures in the application. Non-directories in @INC Non-directories are right now skipped by CPANPLUS::inc. They could of course lead us to newer versions of a module, but it's too tricky to verify if they would. Therefor they are skipped. In the worst case scenario we'll find the sufficing version bundled with CPANPLUS. perl v5.10.0 2007-12-18 CPANPLUS::inc(3pm)
All times are GMT -4. The time now is 04:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy