Skip to content

Instantly share code, notes, and snippets.

@gusenov
Created September 23, 2017 12:41
Show Gist options
  • Save gusenov/dafd0dde4d5a7a91a096a19f2874cdfa to your computer and use it in GitHub Desktop.
Save gusenov/dafd0dde4d5a7a91a096a19f2874cdfa to your computer and use it in GitHub Desktop.
Shell-команда для архивирования папки и добавления к имени архива временной отметки.
# В данном примере архивируется папка Documents в архив с именем типа documents-20170923_184015.tar.gz
tar --create --gzip --verbose --file "documents-$(date +"%Y%m%d_%H%M%S").tar.gz" Documents
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment