[olug] Traversing directories with the file command
Jeff Hinrichs
JeffH at delasco.com
Thu Jun 23 13:51:39 UTC 2005
Depending on your shell, but there is a great resource for bash
scripting here:
http://www.tldp.org/guides.html#abs
-jeff
-----Original Message-----
From: olug-bounces at olug.org [mailto:olug-bounces at olug.org] On Behalf Of
Charles Bird
Sent: Thursday, June 23, 2005 4:22 AM
To: Mike Hostetler; Omaha Linux User Group
Subject: Re: [olug] Traversing directories with the file command
speaking of scripting, I was wondering if anyone knows of any good
resources for scripting knowledge.
I want to be a king of script, it just has to happen, must be done.
----- Original Message -----
From: "Mike Hostetler" <hostetlerm at gmail.com>
To: "Omaha Linux User Group" <olug at olug.org>
Subject: Re: [olug] Traversing directories with the file command
Date: Wed, 22 Jun 2005 13:16:33 -0500
>
> Use "find" to list all the files first:
>
> find |xargs file|grep perl| awk -F : '{print $1}'|xargs ls -lct
>
>
>
> On 6/22/05, webtrekker at cox.net <webtrekker at cox.net> wrote:
> > HELP!!
> > I am trying to create a way to use 'file' and grep to identify
> > perl, shell scripts, ELF apps, etc and list their last modified
> > time. I have been able to use the following command but it only
> > works in the current directory. 'file' doesn't seem to be able
> > to follow a directory tree or have a recursive flag.
> > Here is what I have so far:
> > file * | grep perl | awk -F : '{print $1}' | xargs ls -lct
> >
> > If there was a way to embed that into a script that went through
> > a directory structure that should work. I am not very good at
> > script writing though so any help would be appreciated!
> > Thanks
> >
> >
> > _______________________________________________
> > OLUG mailing list
> > OLUG at olug.org
> > http://lists.olug.org/mailman/listinfo/olug
> >
>
>
> --
> Mike Hostetler
> http://www.binary.net/thehaas
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> http://lists.olug.org/mailman/listinfo/olug
--
_______________________________________________
Surf the Web in a faster, safer and easier way:
Download Opera 8 at http://www.opera.com
_______________________________________________
OLUG mailing list
OLUG at olug.org
http://lists.olug.org/mailman/listinfo/olug
More information about the OLUG
mailing list