Compress folder in zip format using the terminal in Linux. Add current date to filename
ID: 381
Category: Linux Terminal
Added: 8th of November 2024
Views: 116
To compress a folder in zip format and also add the date in UK format to the file name, enter the following command.
zip -r "backup_folder_name-$(date +"%d-%m-%Y")" backup_folder_name
To add the date in US format to the file name, enter the following command.
zip -r "backup_folder_name-$(date +"%m-%d-%Y")" backup_folder_name
%d=date
%m=month
%Y=year
Related Tips & Tutorials
➔ Compress folder in tar.gz format using the terminal in Linux. Add current date to filename