Shell One-Liners

Here are some of my favorites Linux shell one-liners.  These should work with bash.

Find out which shell are you using

echo $SHELL

Change the permission of all files (or some files) in a directory tree

Change to the desired directory first and change 0644 to whatever mode you want.
This one changes all files, and excludes all directories:

find -type f -exec chmod 0644 {} \;

Leave a Reply

Your email address will not be published. Required fields are marked *