I'm a newbie on Linux and had to do something like this with the zip command:
My folder structure inside a zip file abc.zip is:
-- currentdir
-- onestepdeep
-- abc.zip
-- folder1
-- textfile.txt
-- folder2
-- seconddir
-- folder3
-- textfile.txt
I need to copy the file textfile.txt from the seconddir/folder3 into folder1 inside abc.zip
I could move textfile.txt into abc.zip with the following outcomes:
- It would move into
abc.zipasfolder3/textfile.txt(the hierarchy preserved) - Also used a
-jswitch (help said it junked the path info and it did but) - it would move only intoabc.zipand sit at the same level asfolder1andfolder2instead of replacing thetextfile.txtwithinabc.zip/folder1
My question is - I want to replace the abc.zip/folder1/textfile.txt with the one inside seconddir/folder3/textfile.txt.
How do I achieve this via the command line interface?
