Backup files to a time-stamped folder (BASH)

The following will copy the contents of the source_dir to the time-stamped folder.

$ cp -r ~/source_dir/ ~/backup_dir/$(date +%Y-%m-%d_%H:%M:%S)/

Leave a Reply

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