Skip to content

Instantly share code, notes, and snippets.

@MVesuviusC
Created December 13, 2022 14:39
Show Gist options
  • Save MVesuviusC/7b0abd9007de62f8dea7554b009b8d03 to your computer and use it in GitHub Desktop.
Save MVesuviusC/7b0abd9007de62f8dea7554b009b8d03 to your computer and use it in GitHub Desktop.
Find by user and permissions and chmod
# find and chmod files that aren't 444 in a couple directories
for directory in BCLs FASTQs Counts
do
find \
/home/gdrobertslab/lab/${directory} \
-user mvc002 \
-type f \
-not -perm 444 \
| xargs \
-d '\n' \
-r chmod \
444
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment