| Author |
usinf find in unix
|
|
| pawan_test 2006-03-21, 5:56 pm |
| Hi all.,
i am using the follwowing command..
ls -ltr TNT.*.*.*.ctl* | awk -F" " '{print $6" "$7 }'
the output is:
Feb 27
Feb 27
Feb 27
Feb 27
Feb 28
Feb 28
Mar 9
Mar 21
from this output i am trying to get the FIND the files on march 21. i
am using the find command no results.
can anyone please give me some suggestions
thanks
pavi
| |
| Pascal Bourguignon 2006-03-21, 5:56 pm |
| "pawan_test" <sridhara007@gmail.com> writes:
> Hi all.,
>
> i am using the follwowing command..
> ls -ltr TNT.*.*.*.ctl* | awk -F" " '{print $6" "$7 }'
>
> the output is:
> Feb 27
> Feb 27
> Feb 27
> Feb 27
> Feb 28
> Feb 28
> Mar 9
> Mar 21
>
> from this output i am trying to get the FIND the files on march 21. i
> am using the find command no results.
Using find to do this is more complex than using awk. But it can be done.
Read:
man find
--
__Pascal Bourguignon__ http://www.informatimago.com/
This is a signature virus. Add me to your signature and help me to live.
| |
| Mark Rafn 2006-03-21, 5:56 pm |
| pawan_test <sridhara007@gmail.com> wrote:
>Hi all.,
>
>i am using the follwowing command..
>ls -ltr TNT.*.*.*.ctl* | awk -F" " '{print $6" "$7 }'
>
>the output is:
>Feb 27
>Feb 27
>Feb 27
>Feb 27
>Feb 28
>Feb 28
>Mar 9
>Mar 21
>
>from this output i am trying to get the FIND the files on march 21. i
>am using the find command no results.
It's probably best for you to give us the whole problem you're trying to solve
rather than bits and pieces. "list files last modified on march 21" is a very
different question, and much easier to solve than "how do I use awk to print
the date field from 'ls -ltr'" followed by "how do I use find to get files
with this crazy awk output".
Something as simple as
ls -l TNT.*.ctl* | grep "Mar 15" | cut -c 50-
Might do what you want. But I can't really tell what you want from the
questions you're asking.
--
Mark Rafn dagon@dagon.net <http://www.dagon.net/>
|
|
|
|