Creating a gzipped Tar-archive with permission info

Submitted by Peter Majmesku on Wed, 01/10/2018 - 08:44

This depends on the operating system.

Ubuntu e.g. 16.04:

tar -czfp files.tar.gz docroot/docroot/sites/default/files/*

An alternative approach is to just create a Gzip archive. The command will remove the former file and create a Gzip archive out of it (results in "database-dump.sql.gz"):

gzip database-dump.sql
Tags

Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
CAPTCHA This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.