Help with zip in a Python exercise

Anssi Saari as at sci.fi
Thu Mar 28 09:35:32 EDT 2013


luggw1 at elpasotel.net writes:

> I've been working through a Python tutorial online and one of the exercises uses the zip command.  The only problem is that the command doesn't work.  I've read through the man page for zip and it looks like what I'm attempting should work, but it doesn't.
>
> The command is:
>
> zip -qr /media/backup/backups/test/20130326100218.zip -i /home/luggw1/Documents/ /home/luggw1/Code/

-i simply isn't used to to specify which directories you want to
 zip. You can use it to specify filenames that you want in your zip,
 regardless of where they are. Not exactly an option I've ever had use
 for in over a decade of using zip...

Just leave -i out of the command and you'll probably get what you
intended.



More information about the Python-list mailing list