[plug] ls
James Bromberger
james at rcpt.to
Mon Feb 26 22:34:51 WST 2001
On Mon, Feb 26, 2001 at 08:09:46PM +0800, Squirrel wrote:
> Hi all I know this is probably a dumb question but I dont seem to be able to work it out
> All i want to do is list all the files that end in *.html
> and search all subdirectorys as well i.e dos = dir *.html /s
> >From what I have read I thought that
> ls -R *.html
> would have worked but it does'nt
> can somebody give me a example please.
You will find a lot of power in find(1), after you can grok the syntax.
Its great for actually acting on these files you are listing. Example:
find / -name \*\.html -type f -exec chmod a+r {} \; -a -ls
The above will walk the entire FS fromt he root (/) looking for _f_iles
called *.html, and will then change the permissions of each file (denoted by
"{}") and give you a long listing of the file.
find . -type f -atime +100
The above will list all files accessed more than 100 days ago starting
from the current directory (".").
find . -type d -atime -100
The above will list all directories accessed less than 100 days ago.
As alway, RTFM... use "man find". ;)
HTH.
James
--
James Bromberger <james_AT_rcpt.to> www.rcpt.to/~james
IT, Pelican Manufacturing - www.pelicanmanufacturing.com.au
Snr Web Systems Admin, JDV - www.jdv.com * www.hartleypoynton.com.au
* * C u in Bordeaux - 1st Debian Conference, July 2001 * *
Remainder moved to http://www.rcpt.to/~james/james/sig.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20010226/3a6d7176/attachment.pgp>
More information about the plug
mailing list