Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to extract .tar.gz on current directory? (No subfolder) [closed]

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?

like image 341
Vernard Avatar asked Nov 28 '22 09:11

Vernard


1 Answers

Use --strip-components=1 in your tar extract command.

like image 109
Alex Howansky Avatar answered Mar 04 '23 00:03

Alex Howansky