Help with zip in a Python exercise

L

luggw1

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/

The error it produces is:

zip error: Invalid command arguments (nothing to select from)

Can anybody point out the error of my ways?

Thanks.
Bill Lugg
 
J

Joel Goldstick

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/

The error it produces is:

zip error: Invalid command arguments (nothing to select from)

Can anybody point out the error of my ways?

Not sure what os you are using. If linux, then the zip command looks odd.
-q is quiet mode, you might want to remove that til it works. Also not
sure your -i is set up propery. Try to google zip tutorial as this isn't a
python question at all
 
A

Anssi Saari

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top