Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
just removed the second set of keys by rm -r'ing several adguard folders inside ~/Library/Containers/
You can avoid leftovers in the future by using AppCleaner https://freemacsoft.net/appcleaner/
or a similar app.
or would something like
Code:
defaults delete 'com.apple.Safari' <whateverkey>
You can’t do that with defaults. You could probably do it with /usr/libexec/PlistBuddy, but I don’t think it’s worth the effort.
 
finally found com.apple.Safari
so now i'm happy 👍

isn't there an easy way to find the locations of the defaults domains?
defaults find and defaults domains didn't really help (me) here
 
isn't there an easy way to find the locations of the defaults domains?
defaults find and defaults domains didn't really help (me) here
It used to be very simple, all user preference files were in ~/Library/Preferences/. But then apps began to abuse that, setting preferences for other apps, like modifying the search engine or the home page for Safari.
In response, Apple moved app settings in containers (~/Library/Containers) that can be modified only by the app that created them.
Most recent apps only have preferences in Containers, others still use the Preferences folder. For compatibility reasons, defaults reads/writes in both. When defaults returns the domain, that setting can be in Containers, Preferences or both.
You can better understand the structure of plist files with Prefs Editor https://apps.tempel.org/PrefsEditor/ or a similar app.
 
  • Like
Reactions: adrianlondon
It used to be very simple, all user preference files were in ~/Library/Preferences/. But then apps began to abuse that, setting preferences for other apps, like modifying the search engine or the home page for Safari.

and i was beginning to think for the first time in my life that the Windows Registry was actually an elegant solution 🤓
but that makes sense

In response, Apple moved app settings in containers (~/Library/Containers) that can be modified only by the app that created them.
just to clarify: deleting the/a plist would be safe?
and i guess manual modifications would still be possible with SIP disabled, or inside Recovery Mode?

You can better understand the structure of plist files with Prefs Editor https://apps.tempel.org/PrefsEditor/ or a similar app.
thank you! 👍
 
just to clarify: deleting the/a plist would be safe?
and i guess manual modifications would still be possible with SIP disabled, or inside Recovery Mode?
You can delete the whole container of an app, all your settings for the app will be lost, the app will recreate the container when you open it again. Deleting plist files stored in ~/Library/Preferences/ used to be an easy way to restore an app to its default settings.

Based on a previous discussion, writing values in plist files stored in Containers requires Terminal to have Full Disk Access https://forums.macrumors.com/threads/safari-page-loading-stops-after-some-use.2340682/post-31073384
 
found some incredible YT tutorial series some time ago that's right up the alley from a Terminal Dummy's perspective! 👌
sadly he's digressing into actual programming quite a bit (who would have guessed when a course goes by the name "Advanced Programming in the Unix Environment" 🤪)

anyway, if anyone is interested:
 
back with another question that has been nagging on me for some time now:
when i do ls -l

example:
drwx------ 218 user staff 6976 10 Sep 22:04 .zsh_sessions/
-rw-r--r--@ 1 user staff 82 4 Sep 10:56 .zshrc
drwx------+ 4 user staff 128 16 Jul 22:18 Desktop/

i mean the read/write/execute permissions for the owner/group/others are self explanatory, but what are the + and @ signs for, on some of these findings?
the @ i usually associate with a link does not (always) correlate with an actual link here?

and how would/should i change these via chmod?
 
Links will be along the lines of "lrwxr-xr-x", the first character ala "d" for directory.

"@" is for extended attributes. "+" is extended protections (ACLs).

If you do an "ls -le@", you will get more info:

Code:
% ls -le@
total 0
drwxr-xr-x   30 myid  staff   960 Sep 10 11:13 Applications
drwx------+   4 myid  staff   128 May  1 15:59 Desktop
 0: group:everyone deny delete
drwx------+  13 myid  staff   416 Sep  3 10:52 Documents
 0: group:everyone deny delete
drwx------@   5 myid  staff   160 Sep 10 11:24 Downloads
    com.apple.macl     288
 0: group:everyone deny delete
drwx------@  23 myid  staff   736 Jul 28 13:50 Dropbox
    com.apple.FinderInfo      32
drwx------+ 124 myid  staff  3968 Nov 28  2021 Library
 0: group:everyone deny delete
drwx------+   9 myid  staff   288 Mar 29  2020 Movies
 0: group:everyone deny delete
drwx------+  13 myid  staff   416 Feb 23  2020 Music
 0: group:everyone deny delete
drwx------+  20 myid  staff   640 May 27 11:53 Pictures
 0: group:everyone deny delete
drwx------+   6 myid  staff   192 Aug 15  2011 Public
 0: group:everyone deny delete
 1: user:macadmin allow list,add_file,search,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity
drwxr-xr-x+   4 myid  staff   128 Aug 12  2009 Sites
 0: group:everyone deny delete

And in the case of "@", can mean both extended attributes AND protections (See: Downloads in example). And as seen, "deny delete" is a big deal, why you simply cannot delete some folders in one's account.
 
  • Like
Reactions: adrianlondon
Links will be along the lines of "lrwxr-xr-x", the first character ala "d" for directory
yup, was just wondering what those additional symbols were meaning here

"@" is for extended attributes. "+" is extended protections (ACLs).
thanks! 💕
had been using -@ before (but didn't really understand wtf these annoying lines in between were meaning) 🤪

-e is completely new to me, will look up the man page again 👍

so the "deny delete" is an additional attribute that overrides w/x permissions, (or 2/1 with chmod?)
so are these system made settings/protections, or could i manually apply (or remove) that on my own files or folders?
haven't been able to bring up any of these symbols via chmod or chflags yet

oh, and in which ways do FinderInfo, lastuseddata, metadata, etc. correlate to those files? 😳
 
ok, found it out:


had mostly been using chmod with the three digit numbers, only once or twice with the +/- attributes, but didn't know that there are also extended attributes you have to manually list yourself

edit: and it's in the manual too! 👻😂
 
another silly question i've had for a while:

are macOS and Linux reliant on their shells and shell commands / binaries?

i.e. if some binaries like open, cp, mkdir, mv, etc were removed, would the whole system cease to work, or would only the terminal / shell be affected?
 
i.e. if some binaries like open, cp, mkdir, mv, etc were removed, would the whole system cease to work
I don’t think macOS will be affected if they were removed. But they are in /bin/, location on the read-only system volume and protected by SIP in current macOS versions.
 
But they are in /bin/, location on the read-only system volume and protected by SIP in current macOS versions.
yes, i know.
I'm not planning to delete them, just wanted to know wether they are built upon those binaries in order to work.
if i were to delete them, i'd do that on some Linux distro just for testing purposes, where this should be less of a hassle to perform anyway
 
yes, i know.
I'm not planning to delete them, just wanted to know wether they are built upon those binaries in order to work.
if i were to delete them, i'd do that on some Linux distro just for testing purposes, where this should be less of a hassle to perform anyway
What exactly do you hope to learn?
 
was just curious wether these OS's rely on the terminal commands to actually make them work, or these terminals are just some bonus add ons that work completely independent from the GUI driven OS?
 
  • Like
Reactions: adrianlondon
cp, mkdir, mv can be deleted. Finder does not rely on them.
Other binaries in /bin are essential, like launchctl. The OS will not finish booting without launchctl.
bin.jpg
 
The closest to correct answer, imo, is: depends on what you are trying to use the hardware for.

Sure, the OS will run just fine for the most part (launchctl and ilk on other *nix not withstanding) without the shell commands, as the OS is technically the kernel level stuff. The commands are there to help with day-to-day maintenance/keep running, install the software that will run on it, the software itself might require some of that stuff, and so on.

For example, the router you have at home probably is running Linux with most of those commands on it, even though 99.9999% of the population will never ssh into their router. But then you have iOS, which is MacOS/BSD like and probably has close to zero of the shell commands and does its thing just fine.
 
  • Like
Reactions: adrianlondon
hi,
most likely the error is sitting between my ears, but i'm having trouble letting Terminal spit out DNS cached info

i tried
(sudo) dscacheutil - cachedump
and
(sudo) dscacheutil - cachedump -entries <user>

and the answer is always
Unable to get details from the cache node

giving the Terminal Full Disk Access didn't help either

what am i doing wrong? does SIP need to be disabled?

i'm on Monterey if that matters
 
dscacheutil -cachedump
I think that command has been deprecated quietly for some time and I’m not sure if dscacheutil -flushcache does anything in current macOS versions.
Although it’s still being given as the way to Flush DNS Cache.
https://stackoverflow.com/questions/38867905/how-to-view-dns-cache-in-osx
https://osxdaily.com/2022/11/21/how-clear-dns-cache-macos-ventura-monterey/
Apple has stopped updating the page “Reset the DNS cache in OS X” in 2017 https://support.apple.com/en-us/HT202516
 
...and I’m not sure if dscacheutil -flushcache does anything in current macOS versions.
i had no reason to do so, but are you saying that it's currently not possible to flush the DNS cache? 😱
 
hmmm, sorry, i'm not just a noob in Terminal, but also in networking technology! 😂

what i thought what the DNS cache would do is store a lookup table with IP addresses of sites i've visited, let's say apple.com = 17.253.144.10 in the example you've given, plus dozens or hundreds of other links from different sites i've visited to speed up things and the browser doesn't have to always ask some servers which IP address apple.com has, when i try to visit it.

what i'm understanding from your example is that i'm first setting up my connection to Google servers, then verifying that i'm connected to Google servers.
and in the end, i'm deleting the connection to those servers and confirm that aswell.

but i think this way i'm not deleting those lookup tables that probably will be stored on my systems?
or am i completely off?

P.S.: i'm not trying to delete this cache at this point, just wanted to examine it for educational purposes, and to be prepared for the time i'd actually have to delete it
 
I don’t know exactly what happens behind the scenes, but I suspect that every time the DNS servers are changed, macOS clears the cache.
 
i didn’t try to set up a dns server connection and just checked host apple.com which showed the exact same results, but i also checked a website via “host“ that i most certainly never visited before and it still showed that IP address, so the “host“ command doesn’t seem to rely on a locally cached lookup table, but seems to actively be calling out for the corresponding addresses?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.