Whenever I do
tar -pczf file.tar.gz *
it ignores any .htaccess
files, and I can't see in the man how to include it.
The simplest way to add a file to an already existing archive is the ' --append ' (' -r ') operation, which writes specified files into the archive whether or not they are already among the archived files. When you use ' --append ', you must specify file name arguments, as there is no default.
gz using option -xvzf : This command extracts files from tar archived file. tar.
z – filter archive through gzip. r – append or update files or directories to the existing archive files. W – Verify an archive file. wildcards – Specify patterns in UNIX tar command.
htaccess file can be found at installdir/APPNAME/. htaccess. Some applications do not have the installdir/apache2/conf/vhosts/htaccess/APPNAME-htaccess.
The shell is expanding *
to all files in the current directory that do not start with a dot. This is the same rule that ls
uses by default (by convention, files whose names start with a dot are considered "hidden" in Unix). Try instead:
tar -pczf file.tar.gz .
Using .
at the end will collect all files in the current directory, including those whose names start with a dot.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With