[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Re:Help Navigating Directories
- Subject: Re: [cobalt-users] Re:Help Navigating Directories
- From: "Steve Werby" <steve-lists@xxxxxxxxxxxx>
- Date: Thu Feb 21 16:26:01 2002
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
"cbtrussell" <cbtrussell@xxxxxxxxxxx> wrote:
> Is there a way to chmod recursively without affecting directories?
Yes. I touch on it in my previous email. You probably sent yours before
mine arrived. Use the program "find" along with the -exec parameter.
test -d checks if a file is a directory. Here's a command I run to loop
through a directory, output some file parameters and a checksum for files
only (no directories) and append to a file. Hopefully it'll get you in the
right direction. You'll want chown to appear after exec.
find / -path '/home/files' -prune -o -type f -printf
"%m\t%s\t%U\t%u\t%G\t%g\t%AY-%Am-%Ad %AT\t%CY-%Cm-%Cd %CT\t%TY-%Tm-%Td
%TT\t" -exec md5sum {} \; > files_regular
--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/