Useful commands on MacOS

Change extension of files (including sub directories) from jsx to js

for target in $(find ./ -type f -name '*.jsx'); do mv "$target" "${target%.jsx}.js"; done;

Find a text in a path
-R: Recursively search subdirectories

grep "whatever" -R .

Find large files in a path
G: Gigabyte | M: Megabyte

sudo find -x ~/workspace -type f -size +1G