Rob Mayhew | Software Developer

Bash Tips

Create a folder with sub-folders.

                mkdir -p folder/{sub1,sub2,sub3}
            

Will make:

                folder/
                      ├── sub1
                      ├── sub2
                      └── sub3
            

Reduce the size of a png file.

                sips -Z 800 input.png --out output.png
            

This will reduce the image to 800 px on the longest side.