• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Unzip from Shell Leaves Invisible Orphans
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Unzip from Shell Leaves Invisible Orphans


  • Subject: Unzip from Shell Leaves Invisible Orphans
  • From: Christopher Stone <email@hidden>
  • Date: Sun, 20 Dec 2015 00:31:46 -0600

Hey Folks,

I was writing a script for someone on the Keyboard Maestro forum:

cd ~/Downloads/;
curl --remote-name-all -Ls --user-agent 'Opera/9.70 (Linux ppc64 ; U; en) Presto/2.2.1' "http://spatialkeydocs.s3.amazonaws.com/FL_insurance_sample.csv.zip";
unzip -qq FL_insurance_sample.csv.zip;
sleep 0.25;
open -a 'Microsoft Excel' 'FL_insurance_sample.csv'

Nothing too fancy.

I don't often fool with zip or unzip from the shell, but this really surprised me.

When I was testing I needed to run the script again, and unzip asked me if I wanted to replace the ._FL_insurance_sample.csv file.

Eh?

I said OK and let it thinking it was trying to replace the primary FL_insurance_sample.csv file (which I'd already deleted).

It took me a couple of tries before I realized there was something invisible in the works, so I took a quick look with the Terminal.

ls -a ~/Downloads

I noticed the zip resource folder __MACOSX, which was "hiding" at the top of my downloads folder, so I fired up ForkLift and switched on Show Invisible Items for a better look.

~/Downloads/
    __MACOSX/ <-- Visible
        ._FL_insurance_sample.csv <-- Invisible
    FL_insurance_sample.csv

Unzip is not cleaning up after itself and is leaving this orphan folder with an invisible file sitting there.

That seems like misbehavior to me.

Am I missing something?  An option in unzip perhaps?

I can of course test for this junk in my script and delete it if necessary, but this surely falls out of the it just works category.

TIA

--
Best Regards,
Chris

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Unzip from Shell Leaves Invisible Orphans
      • From: Helmut Fuchs <email@hidden>
  • Prev by Date: Re: AS Library Question
  • Next by Date: Re: Unzip from Shell Leaves Invisible Orphans
  • Previous by thread: Postscript, and one for the annals of "Be careful what you wish for..."
  • Next by thread: Re: Unzip from Shell Leaves Invisible Orphans
  • Index(es):
    • Date
    • Thread