Given a file wrong_name.txt, how can I add it to a zip archives archive.zip with an other name right_name.txt without modifying the file itself.

1 Answer 1


One way to cheat, since zip adds referenced files and not the symlink itself (barring the -y option):

ln -s wrong_name.txt right_name.txt
zip myzip.zip right_name.txt
rm right_name.txt wrong_name.txt
unzip myzip.zip
--> right_name.txt

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .