need to change files/dirs! chmod of course
Nils Kassube
kassube at gmx.net
Mon Jul 29 16:48:03 UTC 2024
On 29.07.24 bruce wrote:
> Something has happened.. probably due to phat thumbs over the past few
> days. I've discovered that some dirs/files have had the permissions
> altered. i've got another "clone" that has the dirs/files for the most
> part, so I can chmod as needed..
>
> However..
> I'm trying to figure out how to "ls -al" all dirs in a dir, so I can
> then use the same basic cmd to chmod (when compared to the clone)
Maybe you don't need to list anything, just chmod each file / folder like this:
find | while read f;do chmod /clone/"$f" --reference="$f"; done
I didn't test it though, so just use the idea.
> something like this:
> find /etc/ -maxdepth 0 -type d -exec ls -al "{}" \;
> doesn't work as it lists all in the dir...
Try
find /etc/ -maxdepth 0 -type d -exec ls -ald "{}" \;
instead - then you will not get the contents of the folders but the folder itself.
Nils
More information about the ubuntu-users
mailing list