I
I
Ivseti2021-10-15 19:10:14
ubuntu
Ivseti, 2021-10-15 19:10:14

How to zip a folder and immediately move it to another folder with one command?

Now I'm packing like this
zip -r danilkonev.zip /home/admin/web/danil-konev/

Then I transfer it with the help of the mv command, how to do it with one command? I tried with && and then mv, but something did not work out.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2021-10-15
@Ivseti

and at once to do in the necessary directory?
zip -r /MY/ANOTHER/DIRECTORY/danilkonev.zip /home/admin/web/danil-konev/

D
Drno, 2021-10-15
@Drno

just specify the one you need for packaging, that's all...
Or a bash script -
zip -r danilkonev.zip /home/admin/web/danil-konev/;
mv ... ;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question