Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to rename .tar.gz file without extracting the contents and creating the new .tar.gz file in UBUNTU?

I have a command which will create a new .tar.gz file from the existing one,

 sudo tar -zcvf Existing.tar.gz New.tar.gz

this command will create a new New.tar.gz file from the existing Existing.tar.gz file.

Can anyone tell me, is there any way to rename the exiting file without creating the new one?

Thanks.

like image 810
Madhu Avatar asked Oct 19 '25 14:10

Madhu


1 Answers

The easiest is to simply rename ("move") the file:

mv Existing.tar.gz New.tar.gz
like image 110
arkascha Avatar answered Oct 21 '25 04:10

arkascha



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!