New answers tagged

1

The typical way to do this on Unix-based system is to combine find and touch find path/to/top/directory -type f -exec touch -t 0601120101 '{}' + path/to/top/directory: top directory to start search in, its content and all subdirectories will be searched. You can add several if required type -f: only find files. If you also want to touch directories, just ...


0

The app A Better Finder Attributes is the app you should try. It has a free trial so you can see if it works for you. Disclaimer: I have no financial or other ties with the developer of this application. I am a satisfied user.


1

scutil talks to the System Configuration daemon, configd. Some of the info it deals with isn't stored anywhere (except in RAM), because it relates to the live state of the computer. The part that does get stored is (at least mostly) in the /Library/Preferences/SystemConfiguration/ directory, especially the preferences.plist and NetworkInterfaces.plist files. ...


2

Launchd jobs run with a default shell that does not import any of the typical environment variables you'll see in an interactive shell; in particular the PATH variable lacks any directories that your interactive shell might have added, which can cause headaches. You can work around that two ways: By making your script as thoroughly generic as possible: ...


11

Something like touch index.{js,css,html} should work. Which of course can then be turned into a shell function with miracle() { [[ "$1" ]] && touch -- "$1."{js,css,html} } The test ensures that the files only get created if a name is passed as an argument, the touch -- ensures that miracle -foo doesn't lead to an error. and ...


0

I had a similar issue but I resolved it by executing the command chsh -s /bin/zsh in the terminal,then navigated to Terminal -> Preferences -> General window and changed the Shells open with: option to Default login shell while the command (complete path) set to /bin/zsh.This should solve your problem.


1

You need to use a for loop for this (works in both zsh and bash): for target in "dir1" "dir2" "dir3"; do ditto -- "myfile.css" "testingdir/$target" done If the target directories are actually called dir1 etc you can use wildcard expansion for target in dir[1-3]; do ditto -- "myfile.css" &...


0

In other words, Terminal.app connects you to a certain shell, allowing you to access all sorts of them concurrently. Run cat /etc/shells to see what shells are on your system. I’m sure you’ve got Bash, ZSH, and a few others. Then read up on configuring the history for your chosen shell, and try to make it a habit to always know which shell you’re using. The ...


0

XQuartz settings or preferences are managed from the file ~/Library/Preferences/org.macosforge.xquartz.X11.plist and are managed by XQuartz to read and write them through the agent com.apple.cfprefsd.xpc.agent. The undocumented clean way I found to manage this file is: Quit XQuartz Stop com.apple.cfprefsd.xpc.agent: launchctl stop com.apple.cfprefsd.xpc....


0

I haven’t reverse engineered how this company does it, but I do use this tool to log access so I would tail the log files from MicroSnitch to meet your needs. — https://obdev.at/products/microsnitch/index.html My understanding of watching how this works is they figure out how to tap each specific event on each specific model and each macOS release to do this ...


0

Sorry for wasting your time it was a keyboard problem


0

macOS will automatically quarantine executable files that are written by sandboxed applications, unless the file being written is within a directory for which the application has a "sandbox extension". More on this is available here: https://www.barebones.com/support/bbedit/quarantine.html


0

There is an article for Admins on the Apple site that mentions how to handle this: To use the systemsetup command with either the -setremotelogin or -setremoteappleevents flag in macOS Catalina 10.15 or later, first give the parent process full-disk-access. You can grant full-disk-access manually or using Mobile Device Management (MDM): Manually grant Full ...


4

I've recently started learning shell scripting so I tried an answer to this as an exercise. Script uses diskutil list external to get all external disks then loops over the output to unmount them. I then created an alias in ~/.zshrc so I now only have to type eject in Terminal to eject all external disks attached to my Mac. (thanks to @nohillside for the ...


0

Use newfs_apfs(8) to format a partition with a new APFS filesystem, i.e. to create a new APFS container. For example: sudo newfs_apfs -e -v "My APFS Container" disk0s2 With diskutil, I find that just entering the diskutil command itself and reading the help that it outputs is more accessible than the manpage. You can do this for subcommands, too; ...


1

As explained in the Building Open MPI FAQ, this error can happen when a number of factors occur together: If Open MPI's configure script chooses to use an "external" installation of hwloc and/or Libevent (i.e., outside of Open MPI's source tree). If Open MPI's configure script chooses C and Fortran compilers from different suites/installations. ...


0

To find a user: dscl "/Active Directory/DOMAIN/All Domains" read /Users/user To find a group: dscl "/Active Directory/DOMAIN/All Domains" read /Groups/group


-1

If I put a file in the trash and "empty trash", is that the same as doing rm file? Effectively yes, although the details may vary under the hood. In both cases, the file can no longer be recovered except under certain circumstances1, 2, 3, 4, or perhaps using forensic data recovery techniques. That said, I'd like to offer this as an adjunct: I've ...


2

Yes, rm removes the file as does moving it to trash and then emptying the trash. One nice thing about moving files to Trash is that it gives you a little longer to decide if you really want to delete them. rm will remove immediately.


3

I treat all Input/output (IO) errors as 5 alarm situations. When I see IO in the console log, I save all work, quit all apps and then get a full backup. The filesystem is designed to keep the filesystem intact which means when a file has a problem, the file gets truncated and deleted. Your data loses, the filesystem gets healed. Seeing an IO error bubble up ...


1

This can be fixed in BBEdit by doing this: Check and see whether sandbox access is allowed (in BBEdit's "Application" preferences). If it is not, allow it and I think that will solve this for you. Source: https://twitter.com/siegel/status/1161105160212484097


Top 50 recent answers are included