Results 1 to 3 of 3
  1. #1

    Help unzipping a PW protected file

    I'm trying to unzip a PW protected .zip file from the command line. I can run the unzip, and it then prompts me for a password. What i'm trying to do it make an automated script, and it needs to put the password in automatically for me. How do I do this?

    Here is what I have tried:

    unzip file.zip -d /home/directory/public_html/images/ -p password

    Obviously the -p isn't working, is there a way to input the password automatically in a script?

    Thanks

  2. #2
    Join Date
    Nov 2001
    Posts
    551
    it should be a captial P

    as in:
    unzip file.zip -d /home/directory/public_html/images/ -P password

    at least according to RH9's man page

  3. #3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •