I just zip a file in my remote server using the command "unzip" in the SSH terminal. It works fine but leaves a new folder called "__MACOSX".
Is there any way to make that the command delete this file after the unzip?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
This is an extra folder that OSX computers make, they are hidden on OSX.
To exclude the folder from the extraction do:
unzip ZipName.zip -x __MACOSX/*
Replace "ZipName" with the name of your zip. The important part is matching the folder which is made up of two underscores then MACOSX, /* so it doesn’t extract the hidden file in that folder as well as the folder.