The second one says ~/DATAFILE, the first ~/DATEFILE
My example assumed:
the file named dummy was in the current working directory
This finds regular files: -type f
Consider following the example, if there is confusion. The example I gave you works on any POSIX-compliant UNIX.
The construction of a find query in the example above is:
[code]
find [path is required] -newer [exact path to file ] -type [one of -l -f -d] -exec [shell command required]
where:
-l = link
-d = directory
-f = regular file
Last edited by jim mcnamara; 01-31-2011 at 05:02 PM..
I need to find files that have the ending of .out and that are older than 20 days. However, I cannot use find as I do not want to search in the directories that are underneath the directory that I am searching in.
How can this be done?? Find returns files that I do not want. (2 Replies)
Hi All,
I have a file which contains the listing of another directory:
>cat list.dat
-rwxr-xr-x 1 test staff 10240 Oct 02 06:53 test.txtdd
-rwxrwxrwx 1 test staff 0 Oct 04 07:22 test.txx
-rwxrwxrwx 1 test staff 132 Sep 16 2007 test_tt.sh... (6 Replies)
Dear Friends,
I have two queries.
1) I want to see the list of folders which were created 29 days ago.
2) I want to see the folders in which last created file is older than 29 days.
Can it be done?
Thank you in advance
Anushree (4 Replies)
What command arguments I can use in unix to list files older than 10 days in my current directory, but I don't want to list the hidden files.
find . -type f -mtime +15 -print will work but, it is listing all the hidden files., which I don't want. (4 Replies)
HI,
I have 2 questions.
1>
Is there any code to see files that created some day or some time before in a directory???
2>
how or where i will find the last exit status of a process??
thanks (6 Replies)
Need to cpy those files which are created or modified in last 2 days.
bash$ ll -lrt
total 184
drwxr-xr-x 2 ons dce 256 Oct 12 06:58 files
-rw-r--r-- 1 ons dce 4313 Oct 14 06:06 cab.ksh
-rw-r--r-- 1 ons dce 6 Oct 14 07:03 Code.txt... (2 Replies)
Hello,
I have a script which finds files in a directory that are older than 30 days and remove them.
The problem is that these files are too many and when i run this command:
find * -mtime +30 | xargs rm
I run this command inside the directory and it returns the error:
/usr/bin/find:... (8 Replies)
Hi,
I want to find the sum of all the files created 5 days ago and store it in a variable. (os is HP-UX)
can this be extracted from ls -l
Is there any other way of getting the sum of all the files created (4 Replies)
Discussion started by: bang_dba
4 Replies
LEARN ABOUT CENTOS
test::minimumversion
Test::MinimumVersion(3) User Contributed Perl Documentation Test::MinimumVersion(3)NAME
Test::MinimumVersion - does your code require newer perl than you think?
VERSION
version 0.101080
SYNOPSIS
Example minimum-perl.t:
#!perl
use Test::MinimumVersion;
all_minimum_version_ok('5.008');
FUNCTIONS
minimum_version_ok
minimum_version_ok($file, $version);
This test passes if the given file does not seem to require any version of perl newer than $version, which may be given as a version string
or a version object.
all_minimum_version_ok
all_minimum_version_ok($version, \%arg);
Given either a version string or a version object, this routine produces a test plan (if there is no plan) and tests each relevant file
with "minimum_version_ok".
Relevant files are found by File::Find::Rule::Perl.
"\%arg" is optional. Valid arguments are:
paths - in what paths to look for files; defaults to (t, lib, xt/smoke,
and any .pm or .PL files in the current working directory)
if it contains files, they will be checked
no_plan - do not plan the tests about to be run
all_minimum_version_from_metayml_ok
all_minimum_version_from_metayml_ok(\%arg);
This routine checks META.yml for an entry in requires for perl. If no META.yml file or no perl version is found, all tests are skipped.
If a version is found, the test proceeds as if "all_minimum_version_ok" had been called with that version.
AUTHOR
Ricardo Signes
COPYRIGHT AND LICENSE
This software is copyright (c) 2007 by Ricardo Signes.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.16.3 2010-04-18 Test::MinimumVersion(3)