Skip to content

Instantly share code, notes, and snippets.

@coisme
Last active June 16, 2024 22:53
Show Gist options
  • Save coisme/f89b886ebc508a64fae9b5e2bafb27b5 to your computer and use it in GitHub Desktop.
Save coisme/f89b886ebc508a64fae9b5e2bafb27b5 to your computer and use it in GitHub Desktop.
Remove com.apple.quarantine from download file

When you download a file from internet, the file would have the attribute com.apple.quarantine.

For example, when I downloaded gcc-arm-none-eabi-9-2019-q4-major-mac.tar.bz2, the file had it.

% xattr Downloads/gcc-arm-none-eabi-9-2019-q4-major-mac.tar.bz2 
com.apple.lastuseddate#PS
com.apple.macl
com.apple.metadata:kMDItemDownloadedDate
com.apple.metadata:kMDItemWhereFroms
com.apple.quarantine

If you unarchive this file without removing the attribute, you'll get into trouble when you build. Screen Shot 2020-04-17 at 14 07 48

To remove this flag, run this command:

% xattr -d com.apple.quarantine Downloads/gcc-arm-none-eabi-9-2019-q4-major-mac.tar.bz2

Then, unarchive it.

% tar xf Downloads/gcc-arm-none-eabi-9-2019-q4-major-mac.tar.bz2

You can run the commands without prompt.

% ./gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gdb
GNU gdb (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 8.3.0.20190709-git
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
...
@MansaZeus
Copy link

Trying to open a css file I downloaded but the file doesn't display the file rather it shows this ��� � Mac OS X � 2 ¢ � Ô ATTR Ô ˜ < � ˜ < �com.apple.quarantine q/0083;60d9c0db;Safari;A0F696D4-DCAC-4EC6-AC25-BC71AB3E61C9 . And am currently using windos 10. Can someone help out with a solution please.

@RASHED097
Copy link

https�NTLMSSP%c�%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%s%s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment