2022 Developer Survey is open! Take survey.

New answers tagged

0 votes

Can I reduce the clutter stickies app leaves in macOS 11.4 Apple menu > Recent Items?

You could check out SideNotes. It doesn’t add anything to the recents menu. It's much more convenient.
user avatar
  • 1
0 votes

Determining if Low Power Mode is Enabled/Disabled from Command Line · macOS 12.2.1 (Monterey)

First note that while your picture looks correctly-entered, the line appearing in your question has "highpowermode" printed which, to my knowledge, is not one of the management settings ...
user avatar
  • 406
1 vote

youtube-dl gives errors: "command not found"

Your homebrew setup is broken. Can you reinstall it and then run brew doctor? Then you will test the YouTube-dl and possibly reinstall that. Most of the time you don’t need to uninstall brew but the ...
user avatar
  • 218k
2 votes

Mac daemon not able to run bash script

For anyone else struggling with fdautil (as I was), you need to set the command from the command line before it will work from launchcontrol. For example: sudo /usr/local/bin/fdautil set daemon LABEL /...
user avatar
-1 votes

Every time I start my terminal, I get ".zshrc:source:18: no such file or directory: /sourceme.sh"?

The solution that worked for me is the following: https://code.visualstudio.com/docs/supporting/faq#_resolving-shell-environment-fails
user avatar
3 votes

How do I view inline images in w3m?

From https://ilyakava.tumblr.com/post/616300103655948288/terminal-web-browser-with-images-macos: First, you’ll have to use iTerm 3.3 or later. Install the image converter for the terminal: brew ...
user avatar
0 votes

Missing Plug-in error while placing dashboard web clip widget on the desktop

Here's a technique I've found that fixes this issue, at least on a couple of my macOS 10.14 systems: Open System Preferences and pick Mission Control Change the Dashboard setting to "Off" ...
user avatar
  • 1,924
2 votes

How to run "node index" from a folder in terminal

You may have the cart before the horse here (or even two carts if you really want launchd or cron to schedule your process to run). I would save your command to a script file and test it with your ...
user avatar
  • 218k
-1 votes

'/usr/local/bin/curl' and '/usr/local/bin/ssh' commands are killed when executed in macOS Monterey

FWIW, I ran into the same problem after replacing an ancient 2012 Mac Pro server with an Apple Studio. It appears that macOS Monterey has new security "features" that make it impossible to ...
user avatar
2 votes

How to fix unresponsive filesystem without rebooting?

Your best bet is to stop navigating in that folder path and try to umount it. Even a df may put you in timeout mode. If you think your ssh connection is stale, you could look at ServerAliveInterval (...
user avatar
  • 218k
2 votes
Accepted

How to mount external disk with sshfs and show the name in Finder?

There is a volname argument. Have you tried adding -ovolname=remote … when you use ssh to make sftp build a snapshot of the remote filesystem locally on your Mac.
user avatar
  • 218k
0 votes

Running the same commands on multiple remote hosts

If you have ssh access to all remote systems, you can run for h in user@server1 user@server2 user@server3; do echo "===== $h =====" ssh "$h" sh -c 'cd /var/log/server; grep ...
user avatar
  • 84.6k
0 votes

Running the same commands on multiple remote hosts

Using Alfred Clipboard History This is a slight enhancement of the copy-paste option that relies on the Alfred app — Alfred is a launcher, providing a faster way to launch applications or perform ...
user avatar
  • 131
0 votes

Clear Terminal command history

Update 2022-05-05: For macOS 12 Monterey and above, you'll need to use this command to clear the Terminal history: rm ~/.zsh_history Alternatively, you can open your user folder in Finder, press ...
user avatar
2 votes

How can I execute a function defined in bash profile, from a launchD plist file?

I couldn't seem to read functions from my bash_profile. Instead I added an alias in my bash_profile to point at a script and pointed my plist file at the same script. I think this is a better ...
user avatar
  • 304
3 votes

How to export Time Machine exclusions or list them in Terminal

Here are 3 ways of getting Time Machines exclusions: Firstly, every backup includes its own exclusion list. At the top level of each backup there is a hidden file called .exclusions.plist, for example ...
user avatar
  • 6,058
2 votes

In Terminal, using the "touch" command to mass create consecutive files with leading zero's, with bash, produces different results than zsh

Without installing a package manager and then a newer version of your shell, you could work with the tools you have. Using the builtin command printf you could- touch $(printf "file_%02d.txt &...
user avatar
  • 9,209
2 votes
Accepted

Linker command failed (clang-13)

The issue is a bug in the software's Makefile. It assumes that macOS is always of the form 10.x which it was for 20 years. The bad lines include MACOSXTARGET := 10.$(MACOSX_MINOR) ifneq ($(subst $(...
user avatar
  • 27.1k
0 votes

Is an image as ".jpe" an ordinary JPEG, just with a different file extension?

The one problem I can think of is if these files are used by some software, and called upon explicitly by name. If so, then renaming the extension may cause a 'file not found' error.
user avatar
  • 22.7k
3 votes

Is an image as ".jpe" an ordinary JPEG, just with a different file extension?

According to Wikipedia all of these extensions .jpg, .jpeg, .jpe .jif, .jfif, .jfi are a valid JPEG file extension. The most common filename extensions for files employing JPEG compression are .jpg ...
user avatar
  • 131
-2 votes

Is an image as ".jpe" an ordinary JPEG, just with a different file extension?

Just rename the picture that has *.jpe into a jpeg. You can do it by clicking the left side of your mouse and choosing rename or long-press the picture and find the option rename.
user avatar
1 vote
Accepted

In Terminal, using the "touch" command to mass create consecutive files with leading zero's, with bash, produces different results than zsh

The Bash version included with macOS is quite old (3.2.57 as of Monterey 12.3.1) and doesn't honor leading zeros when expanding {01..10}, but newer versions of Bash do (from man bash): A sequence ...
user avatar
  • 13.5k
4 votes
Accepted

Is an image as ".jpe" an ordinary JPEG, just with a different file extension?

If identify says its format is JPEG, you can rename it to .jpg or .jpeg and use it normally (if the file isn't corrupted in any way besides having an incorrect extension). Moreover, some readers or ...
user avatar
  • 56
2 votes

Change default shell from bash to zsh

In addition to the other answers, you may need to go to Terminal -> Preferences -> General and change "Shell opens with" to "Default login shell".
user avatar
0 votes

Is it safe to use `trash-cli` on macOS?

As per the other answer there are ways that are much less complex that trash-cli, that is no need to much around with odd directories, so in your terms it is safer. They also can mark the trashed item ...
user avatar
  • 27.1k
2 votes

Is it safe to use `trash-cli` on macOS?

I can't comment on the safety or security of that app except to say that it looks more complicated than others I've seen - and the one I use. There is a thread here on this subject that may prove ...
user avatar
  • 3,220
0 votes

How to delete a system file as an admin

You can issue the: csrutil disable command to disable System Integrity Mode (SIM). then, while in recovery mode stil: sudo rm -rf /target Disabling SIM is generally frowned upon and I recommend ...
user avatar
1 vote
Accepted

How to use `netstat' to show utun (socket) interfaces?

The man-page for netstat lists these options: A, a, b, c, d, f, g, I, i, L, l, ll, lll, m, n, p, q, r, R, s, S, v, W, w, x and z. The source code for netstat lists these options: A, a, b, c, d, F, f, ...
user avatar
  • 65.1k
0 votes

How can I get accurate information about disk space used/available in Big Sur via the command line?

AppleScript can get the free space of a disk, which gives the same number as the Finder. Open Script Editor and save the following script as ~/Library/Scripts/Free Space.scpt: tell the application &...
user avatar
  • 1,885
-1 votes

Does Apple provide a web site with content of `man` pages for the command-line commands bundled with Mac OS X?

You could also use tldr++ A quick an easy way to see a couple of examples of the use of a command.
user avatar
  • 159
4 votes

Change Mac terminal name before the @

This information is generally referred to as the prompt. While there are differences between the various shells like bash and zsh, generally speaking you can set prompt options by modifying the shell ...
user avatar
  • 4,937
0 votes

Change Mac terminal name before the @

The name before the "@" is the user who is logged in. You can't change that unless you change to another user. The name after the "@" is the localhost determined by Apples's ...
user avatar
  • 9,209
1 vote
Accepted

What is '<<EOS' in shell commands like 'osascript <<EOS'

(Thanks to @red_menace, @fdo, and @nohillside so far. I've upvoted @red_menace's. It's "correct", but I found it difficult to grasp. I didn't really get it, until I read @fdo's link (first ...
user avatar
  • 378
6 votes

What is '<<EOS' in shell commands like 'osascript <<EOS'

It is a here document (heredoc), and is built-in to several shells such as bash and zsh. The text between the delimiting identifiers (EOS in this case) is redirected to the command.
user avatar
  • 1,084

Top 50 recent answers are included