Extract files using tar and override specific directory
Quote from moshe on 23/10/2020, 4:52 pmProblem
User wants to extract the archive and upgrade current installation of wordpress or any otherwhen using tar xf command it puts everything in a directory called wordpress-5.1.1, all the files and subdirectories of that directory to overwrite (and add to) the existing wordpress directory.
Solution
extract using the following command
tar –strip=1 -zx -f wordpress-5.1.1.tar.gz -C wordpress
Problem
User wants to extract the archive and upgrade current installation of wordpress or any other
when using tar xf command it puts everything in a directory called wordpress-5.1.1, all the files and subdirectories of that directory to overwrite (and add to) the existing wordpress directory.
Solution
extract using the following command
tar –strip=1 -zx -f wordpress-5.1.1.tar.gz -C wordpress