Re: Change permissions for directories only
From: James McIninch (james.mcininch.nospam_at_comcast.net)
Date: 09/13/04
- Previous message: Lester: "Re: Need help with Linux Equivalent of a DOS command"
- In reply to: gf: "Change permissions for directories only"
- Next in thread: Stu: "Re: Change permissions for directories only"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 13 Sep 2004 04:45:50 GMT
<posted & mailed>
gf wrote:
> Can chmod be used for changing permissions for directories only and/or
> files
> only? In other words in a directory/file structure like
>
> folder
> --- subfolder1
> ------ file1
> ------ file2
> --------- subfolder2
> ------------ file3
> --- subfolder2
> ------ file4
>
> (etc.)
>
> I want all files to be 644 and all folders to be 755. It seems that it is
> an all or nothing exercise. chmod -R * and then go back and do the
> folders
> individually? Hopefully there's an easier way. Thanks.
find folder -type d | xargs chmod 755
find folder -type f | xargs chmod 644
-- remove .nospam from e-mail address to reply
- Previous message: Lester: "Re: Need help with Linux Equivalent of a DOS command"
- In reply to: gf: "Change permissions for directories only"
- Next in thread: Stu: "Re: Change permissions for directories only"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|