New answers tagged

1

If you do not want to change your shell from bash to zsh, then add this to your .bashrc file: export BASH_SILENCE_DEPRECATION_WARNING=1 To edit this you can use this command: nano ~/.bashrc While you are editing your .bashrc file, look for aliases or functions which redefined ls use Ghostscript. Try which -a ls in Terminal.app to show you what ls is ...


0

You have several options to start mongodb and show the mongo log: Directly in the Terminal window: brew services start mongodb/brew/mongodb-community && tail -f -n100 /usr/local/var/log/mongodb/mongo.log In a second Terminal windows (or a tab) (the second one has to have a known tty device number - you get it e.g. with w or tty): brew services ...


0

The mongodb-community service logs to the following places: $HOMEBREW_PREFIX/var/log/mongodb/mongo.log $HOMEBREW_PREFIX/var/log/mongodb/output.log Usually this means that they're located in: /usr/local/var/log/mongodb/ You can continually stream the logs using a command like this in the Terminal: tail -f /usr/local/var/log/mongodb/*.log


1

It's a bug related to the old version of bash included in macOS. To overcome you can Switch to zsh (see What are the practical differences between Bash and Zsh?) Install a more recent version of bash via Homebrew and use this as your standard shell (see How to use bash as default shell)


0

If you're using zsh (which is the default in macOS 10.15), put this in your ~/.zshrc instead: if [ $ITERM_SESSION_ID ]; then precmd() { echo -ne "\033]0;${PWD##*/}\007" } fi You can also spell \033 as \e and \007 as \a.


1

This is a somewhat speculative answer, on the assumption that your account is coming from an Active Directory domain your Mac is bound to. You can check this by running: dscl /Search -read /Users/"$USER" | grep AppleMetaNodeLocation If it prints something like "AppleMetaNodeLocation: /Active Directory/<somedomain>", then your account is coming from ...


0

Each shell has ‘profile’ files, the contents of which are run when the shell is launched. For bash, this includes ~/.bash_profile. Create this file and add any commands you wish to run in that file, then relaunch your shell.


1

Make sure that the shell script within Borg.app is executable (chmod +x ...) all the files within Borg.app are accessible by the current user any command called from the script is called with the full path specified (especially for things stored in /usr/local/bin and similar non-default places)


0

XAMPP-VM runs within a Linux VM, so you can't access the config files directly within the macOS filesystem. To access the VM either open Terminal from the XMPP launcher or run ssh -i ~/.bitnami/stackman/machines/xampp/ssh/id_rsa -o StrictHostKeyChecking=no root@192.168.64.2 By default the XAMPP VM doesn't include any editor at all so you need to install ...


0

I think it is a bug in Finder. To make that file visible you need to re-start the finder as follows: Press COMMAND+OPTION+ESC then select Finder and click on Relaunch.


3

The only line that does work in that script is xattr -c "$FILE" To run a command on all files in a folder, use find: find /path/to/folder -type f -exec xattr -c "{}" \; xattr also provides the -r flag to run recursively, so you can avoid find given that this functionality is part of xattr: xattr -rc /path/to/folder


0

You can access the list of permissions in System Preferences => Security & Privacy. Select the Privacy tab and then choose Camera in the list on the left. You can then checkmark the apps on the right that you want to have access to the camera. If you have previously denied access to a program, it should appear here where you can checkmark it to allow ...


0

I have a similar issue. Following the steps in the Apple Support article, the terminal command "diskutil resetUserPermissions / id -u" never stops (within 8 hours). My symptom that led me to try to correct permissions is that every few days, most files in my home directory fail to open using Apple apps and others (Excel, BBEdit, etc.). Oddly, pdfs that ...


0

Open the Preferences in the terminal (top right) Go into the Shell tab Then copy/paste the command export PS1="\W \$"; clear; Uncheck the "Working directory", "Active Process", and everything else under the Title section. Then restart the terminal and should work. The final look will be like this


0

The reason for that is because you are running zsh shell. I'm running the bash shell and no name or directory shows up in terminal window name. You can run bash before running terminal and that should give you the window name you want. If you type zsh the terminal name will change back. I don't have Catalina but I've read its changed initial terminal ...


0

Akamai runs a content distributions system used by major websites to provide fast web response on a global scale. It is used by Apple, Adobe, Microsoft and many others. Port 443 is used for HTTPS - the encrypted version of HTTP web-page access. It is quite normal to see a lot of traffic directed through Akamai. iCloud content is stored on Akamai servers. ...


16

@bmike has already offered the easiest solution, but I wanted to go back to the GUI instructions not working. I found that Apple’s instructions here can be confusing. Control-Clicking will not do anything unless you first “unlock” the Users & Groups pane, as shown below in the blue box: Once you have it unlocked, be sure you are clicking in the white-...


15

Don’t use sudo directly without some additional switches - your invocation would change root’s shell, not your user account. If your short name is mike (you can check with whoami or who am i sudo -s chsh /bin/zsh mike Or if you know an admin short name and password you could skip the sudo initially chsh -u admin /bin/zsh @ me if you still have issues, ...


1

My one line. curl -s https://support-sp.apple.com/sp/product?cc=$( ioreg -l | grep IOPlatformSerialNumber | awk '{print $4}' | sed 's|"||g' | cut -b9-13 ) | sed "s@.*<configCode>\(.*\)</configCode>.*@\1@" Output: MacBook Pro (15-inch, Late 2011)


0

Rather than guess at what AppleScript is doing, have you considered running it in a debugger to know the variables as it runs and errors out? https://latenightsw.com/ Some things that make it hard to make a better answer are the parts where you say: The main took with past issues on this site on this topic. And but apparently the wrong condition, ...


2

Type python3 and you will be running the new version. How you install can vary a bit, but on the current macOS you don’t need to install anything as the stub exists. On any older os I recommend installing https://brew.sh as it has a very friendly on boarding and helps you set your PATH properly to run the v3 of python. A shell alias is an easy way to fix ...


3

You have to give the Terminal.app Full Disk permissions in the security settings.


1

Add this line to your .bashrc or .bash_profile if you don't want to see the "garbage" anymore. PROMPT_COMMAND="{ ${PROMPT_COMMAND}; } 2>/dev/null" caveat: stderr output from ${PROMPT_COMMAND} will be muted.


1

print is not a standard bash command. I think so because man print returns no manual entry. puts is a Standard C Library function and should be used inside a file and used as: #include <stdio.h> puts(const char *s); The function puts() writes the string s, and a terminating newline character, to the stream stdout. An example: /* puts ...


1

The console is your physical computer and the various tty are virtual terminals. Each tab or window of a terminal emulator like iTerm2.app or Terminal.app will connect to a different tty. MacOS works the same as this quote from one of the answers on your linked question: So when you look to a "text window" on your linux system (under X11) you are ...


0

BitBar (GitHub) is a useful tool for running scripts from the menubar, and it has a lot of built-in functionality like being able to show script output, create dropdown items, perform actions on click, and more. See the Plugin API section of the GitHub README for a description of all the functionality you can use. Here's an example from the site showing ...


0

You could use a different program. One comment on your linked question suggests using homebrew to install GNU Coreutils. Alternatively you could simply download it from here, unzip it and can compile it with: cd ~/Downloads/coreutils-8.31 ./configure make You then get a version of ls that formats output for color and monochrome the same. If output will ...


2

In macOS 10.15 Catalina, I found it in: /System/Applications/Utilities/Terminal.app This is how I found it: open Spotlight (Cmd+Space) type: Terminal hold the keys Alt+Cmd, then double-click on the Terminal.app found by Spotlight (should the first one in the list) that will open Finder and highlight Terminal.app if you drag Terminal.app into a text file, ...


5

You can enable the Script menu from the built-in Script Editor.app: Preferences → General → Show Script menu in menu bar. Then you can place any AppleScript in this menu by putting the script in your Scripts folder. To add user-level scripts to the script menu, save them into the ~/Library/Scripts/ folder of your user directory. For quick ...


1

The properties of themes and profiles are stored in ~/Library/Preferences/com.apple.Terminal.plist in the key Windows Settings/[Name of the Profile]: Obviously only diffs to a hidden default profile (it's not the Basic profile!) are stored. In the example above I made a copy Basic 1 of the Basic theme and arbitrarly disabled and enabled settings in the ...


0

Alternative for Mac OS (Darwin) is: osascript -e 'quit app "Visual Studio Code"'


0

You asked: "How long should diskutil resetUserPermissions take (Catalina)?" If you follow the steps in your linked Apple support article under the heading, "If Terminal says that permissions reset failed", resetUserPermissions should finish in less than 10 minutes.


3

My solution to darting between Mac and Linux as a developer is to use tmux, which runs in the terminal on both platforms. You get an identical feature set, and you can even sync your config files between the two platforms for all your fave build shortcuts across terminal panes, and anything else you'll ever think of, I imagine. tmux runs in a terminal, and ...


1

Job #1 - is to determine if the USB device is being recognized in any form, you can do that by looking for the USB VID and PID (described below). When you plug the cable in, you should see the device appear in the list, and go away when you unplug. The VID number will tell you the ACTUAL chip type, ie: FTDI, SiLAB, Prolific, or Microchip there are many ...


1

It seems the solution was after running 1st command to run: sudo -s Somehow it fixed situation and now again both commands are working without any problem as they did before. Hard to say what was the reason for this (maybe introducting zsh) but now I can again edit files I need


3

Installation: Download the zip to your Downloads folder Unzip displayplacer-master.zip Enter in Terminal: sudo mv ~/Downloads/displayplacer-master/displayplacer /usr/local/bin/ sudo chmod +x /usr/local/bin/displayplacer displayplacer Depending on your Security & Privacy settings you have to allow execution of the file in System Preferences > Security &...


1

The perform action command is going to go the the frontmost window that meets the criteria of the the given command. As such, you need to use the activate command after tell application "iTerm" so win1 will be frontmost when the perform action command is triggered. tell application "iTerm" activate set win1 to (create window with default ...


0

If in your homebrew installation you also installed XCode tools on your mac you may just need to close your terminal window and open a new one :)


0

Enabling the Reduce Motion setting in the Accessibility section of preferences will speed things up a bit. Hope this helps!


1

TL;DR I turned the offending line into a comment by adding a ˋ#ˋ in the first column and restarted Apache. To fix this, I followed the Youtube tutorial and opened up the file "httpd-autoindex.conf" using Finder and navigated down to line 21 which has the error. It reads Alias /icons/ "/usr/share/httpd/icons/". Then I found this tutorial by just searching ...


1

I do not know of a speed setting for this action. That said, the default setting for the Dock preference Minimize windows using: is Genie effect and the Scale effect may be a bit faster, so I'd try that one. There is also a Suck effect, which can be implemented via Terminal, using the following compound command: defaults write com.apple.dock mineffect -...


1

I don't have enough reputation to post a comment, so I will post an answer instead, though I don't expect it to solve your problem. If you're asking for a one-time restore (like the "Recently closed tabs" option in Chrome), I don't know of any way to "restore" those specific tabs and commands. You can type history into the Terminal and it will list the ...


1

This is probably not the answer you're looking for, but apparently this can't be done. Please see this question: iOS mount point in macOS


1

Here is what worked for me: assuming that you grab input by having as a first line in your script the following: on run {input} Then you can perform within an iTerm window: write text "watch -n1 " & "'" & "kubectl get pods | grep -i " & input & "'"


1

Your run handler looks lifted from Automator, but your desire to have it as a script invoked from the shell suggests it's designed to be run independently of Automator. Here's an edited form of the script that you can copy and paste into a terminal (like iTerm): (:(){ paste - << SCRIPT > "$*" && chmod +x "$*" #!/usr/bin/env osascript on ...


0

Bartender will let you organize and hide icons on your menu bar. This is probably the best-known solution. Another alternative that you might want to check out is Vanilla. I use Bartender and highly recommend it, but it’s worth downloading both and checking them both out. Before you ask, no, there is no way to do this without 3rd party software, unless ...


1

Right after tell application "iTerm" add: if (window count) is equal to 0 then reopen This will open a new window if none are open but iTerm is running. You can also use the following example AppleScript code to make sure window 1 exists before continuing, if one wasn't already open. if (window count) is equal to 0 then reopen repeat until exists ...


1

Variation of @d3Xt3r answer: tar xOvf PackageName.pkg output.pkg/PackageInfo 2>/dev/null | grep '<pkg-info' \ | sed "s#.* version=\"\([0-9\.]*\)\".*#\1#" Advantage is that this is only pipe processing. Note my package had different structure, there is an extra directory output.pkg which contains file PackageInfo


1

This is a fairly simple if (running) quit, else launch structure. You'd have to leave the Script.app somewhere you can find it with the mouse, as KeyboardCleanTool will, of course, deactivate the keyboard input entirely if it is set to start cleaning mode automatically at launch. set appName to "KeyboardCleanTool" if application appName is running then ...


2

You would be best advised to either create the application from within Script Editor as an actual AppleScript app written in AppleScript; or to create an executable shell script program that is written in shell script without calling out to osascript. There's nothing wrong per se about mixing it up, and indeed there's lots of situations where it's needed or ...


Top 50 recent answers are included