I have used xattr -d com.apple.quarantine /Users/username/Desktop/app_name.app to remove the attribute but I don't know how to give the attribute again. Could you please help me?
MacOS – How to give a file the com.apple.quarantine attribute on mac
extended-attributesmacos
Related Question
- MacOS – Set file metadata attribute values
- macOS – Setting (Restoring) the com.apple.quarantine Attribute
- MacOS – why can I login MacBook with different usernames of the same user
- MacOS – Disabling Use of ‘com.apple.quarantine’ Extended Attribute on Mojave
- How to disable com.apple.quarantine on Catalina
- macOS – Fix Permission Denied When Accessing Backup Directory
Best Answer
You should be able to do this by replacing the
-d
(delete) flag with-w
(write). So:xattr -w com.apple.quarantine /Users/username/Desktop/app_name.app
A handy tip if you are unsure about a command is to look up the man page for it.
If you type
man xattr
it will give you a list of available options for that command with explanations. (to navigate the manual use the arrow keys and press theq
key to quit.)