[prev in list] [next in list] [prev in thread] [next in thread]
List: suse-linux-e
Subject: Re: [SLE] Brainlocked over recursive script.
From: Anders Johansson <andjoh () rydsbo ! net>
Date: 2006-05-29 12:59:48
Message-ID: 200605291459.48668.andjoh () rydsbo ! net
[Download RAW message or body]
On Monday 29 May 2006 14:56, Leendert Meyer wrote:
> ls -R * |
> while read f; do
> if [ -f "$f" ]; then
> chmod 644 "$f"
> fi
> done
No, it's fundamentally broken. ls doesn't print the full path, so the only
result from the above (except for the files in the top level directory) is a
lot of "No such file or directory" errors. Per's "find" works
--
Check the headers for your unsubscription address
For additional commands send e-mail to suse-linux-e-help@suse.com
Also check the archives at http://lists.suse.com
Please read the FAQs: suse-linux-e-faq@suse.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic