Hot answers tagged

6

Selecting the option to "Block all incoming connections" prevents all sharing services, such as File Sharing and Screen Sharing from receiving incoming connections. Start with the firewall general help is my advice. https://support.apple.com/en-us/HT201642 Once you know how those controls work, a follow-on question might work on how to lock this ...


3

This is untested: remove the echo if it looks right: find ./Export -name '*.jpg' -print0 | xargs -0 sh -c 'for file; do echo mv "$file" "${file%/*}"/..; done' sh The odd-looking trailing "sh" is required because it gets set as "$0" in the shell body, so the rest of the arguments fed to it by xargs can be easily ...


2

/usr/libexec/path_helper is used to build PATH from the default in /etc/paths and the entries in /etc/paths.d (see man path_helper for details). By default this is called in /etc/profile which is executed for each sh/bash/zsh style login shell. On my system /etc/profile looks like this # System-wide .profile for sh(1) and friends if [ -x /usr/libexec/...


1

From man bash Aliases are not expanded when the shell is not interactive, unless the expand_aliases shell option is set using shopt (see the description of shopt under SHELL BUILTIN COMMANDS below). So unless you explicitly set an option, aliases aren't expanded in scripts and any reference to python will call the binary directly. For interactive use it's ...


1

Before removing anything, run mount and eject or more safely, I would disable every network connection, detach all drives and then reboot. At that point you can be sure all the directories are actual directories (except the system mounts) and clean them safely and strategically. Going forward, I would never mount anything here. Let the system manage it if at ...


1

There is no need to check whether there currently is a crontab installed or not. Just run (crontab -l 2>/dev/null; echo '@reboot bash /Users/user/myscript.sh') | crontab - to add the @reboot line to your crontab (or create a new one).


1

Not a drop-in replacement and not directly compatible with bash/zenity, but if you want a non-portable native Mac OOTB solution with no extra dependencies then you might want to consider AppleScript. Below is a typical scenario of a script that builds a dialog from the output of a shell command (emulator -list-avds which lists android emulator images), and ...


Only top voted, non community-wiki answers of a minimum length are eligible