Zip files and UUID from Bash

Two quick items for .bashrc.  The archive command takes a folder name and zips its contents.  The UUID produces a unique number easily.

archive() { read -p "Enter folder name: " name && zip -rv9 $name-$(\
            date +"%Y-%m-%d-%H%M%p").zip $name; }
uuid() { UUID=$(cat /proc/sys/kernel/random/uuid) && echo $UUID; }

Leave a Reply