Currently when extracting the WordPress latest.tar.gz file from shell it extracts it inside a /wordpress/
folder.
How would I get it so it just places the files in the actual current directory?
Making an automatic script, I was thinking of doing mv /wordpress/* ./*
but would that work?
Use
--strip-components=1
in your tar extract command.From
man tar
:So first do
then
for version 1.14.90+, or
for older versions.
Alternatively, you can of course make a simple command chain:
In a first step gunzip the file:
The latest.tar file remains.
To extract that to working folder use