Questions tagged [command-line]

Using programs and commands that do not have a graphical user interface (GUI) but are rather controlled by typing text commands into a terminal program, or shell.

Filter by
Sorted by
Tagged with
0 votes
0 answers
26 views

How to enable horizontal scroll on `less` with trackpad?

I want to use my trackpad in macOS to scroll less horizontally. Is there a way to do this?
HappyFace's user avatar
  • 570
-1 votes
0 answers
57 views

How Do I Set-Up a Synthetic Firmlink in Catalina with Terminal? [closed]

I just dragged myself kicking and screaming from Mojave to Catalina and I like to have my "Stuff" in the root directory of the boot drive. So, I've already disabled SIP using "csrutil ...
Orion's Bell's user avatar
1 vote
0 answers
10 views

Make a RTP-MIDI session in "Midi Network Setup" reconnect to a participant after reboot

In a studio setup, I need an RTP-Midi (AppleMidi) session, that is set up via "Audio MIDI Setup" to reinitiate with a participant, after reboot. At the moment, the Session is active but the ...
adrifromhh's user avatar
1 vote
0 answers
23 views

How can I tell if the Content Caching feature is working correctly?

I enabled this on a Mac Mini which I use as a server with attached storage. It's shows that it's "working" and my iMac finds it "healthy" however none of the large updates we've ...
John's user avatar
  • 884
0 votes
0 answers
14 views

Open an image from command-line maximized and on second monitor?

Is it possible to open an image from command-line maximized (but ideally not enlarged) and on the secondary monitor (if it's plugged in)?
Meng Lu's user avatar
  • 231
0 votes
0 answers
31 views

Requiring system restart for internet to work every several days

Using my Macbook, I connect to the secure Wi-Fi at the hospital where I work, and the internet usually works beautifully. After several days of sleep-wake cycles, the internet gets slower. Eventually, ...
The_Anomaly's user avatar
1 vote
0 answers
38 views

Why is mac able to find some bin in PATH but not others?

I recently upgraded Python but encountered some strange behavior: I have both /opt/homebrew/bin and /usr/local/bin in my PATH variable. python was in both these directories. When I removed the one in /...
ron burgundy's user avatar
1 vote
0 answers
37 views

How can I modify the "Date Added" of a file via the terminal? [duplicate]

Whenever I move files between folders or to an external hard drive, I lose the "Date Added" metadata of the files. I need this info for sorting purposes. How can I change that field via the ...
JStyle's user avatar
  • 11
0 votes
0 answers
20 views

How Do We Access Sonoma Password Manager Items from the Command Line?

I have some automation that uses /usr/bin/security to pull data from my Keychain. I want to move this data to the new Password Manager (Settings.app -> Passwords), but I can't find the items in ...
opsmason's user avatar
  • 191
0 votes
2 answers
59 views

MacOs list package install via curl

Is there a way to find the list of packages that have been installed via curl? For example I installed the following two packages: Bun: curl -fsSL https://bun.sh/install | bash Maestro: curl -Ls &...
Paul's user avatar
  • 101
1 vote
1 answer
75 views

Xcode command line tools uninstall not working

I am trying to uninstall Xcode command line tools and I used the command: sudo rm -rf /Library/Developer/CommandLineTools to delete the folder but when I use the command: xcode-select -p it still ...
speedyfastboi's user avatar
0 votes
1 answer
53 views

Misleading diagnostic message

I generally use /tmp/tmp for throwaway files, but when I accidentally missed the slash, I got: WGroleau@MBP ~ % find /Users -name "Cami*x" -print > /tmptmp zsh: read-only file system: /...
WGroleau's user avatar
  • 4,561
2 votes
1 answer
320 views

Which macOS version introduced "readlink -f"?

The readlink utility on recent macos versions (I'm on ventura) support the "-f" switch, but that has not always been the case. I note, for example, that it's NOT present on 11.6. Which was ...
xpqz's user avatar
  • 123
0 votes
2 answers
38 views

I would like to preempt a command on my mac (specifically, Keytool)

I need, when generating Java keystores (which I do frequently), to generate them under the Java 8 version of Keytool. If I use the keytool in the default Java version, they are incompatible with the ...
hbquikcomjamesl's user avatar
3 votes
1 answer
94 views

pmset: Error 0xe00002bc

I've recently started getting this error when running any of these commands on my iMac (macOS Ventura 13.5.2 (22G91)): sudo pmset sched cancelall pmset: Error 0xe00002bc scheduling repeating events ...
nachocab's user avatar
  • 573
1 vote
0 answers
37 views

How can I run bash command with having Sandbox in Swift? [closed]

I made a working app which hides and shows the desktop icons using bash the terminal command for making it, easier to do this job with an UI, it works ok without sandbox and if there is sandbox it ...
bulletproof software engineer's user avatar
0 votes
1 answer
33 views

`tput setaf` inconsistency + fail (Ventura, Sonoma)

I'm attempting to customise my bash prompt, so that I get this: i.e. user-text is in bold, but stdout is not. It was working, but after upgrading my mac it's glitching. Machine A: MacBook Pro 2017 ...
P i's user avatar
  • 1,676
1 vote
0 answers
26 views

Add "Allow in the background" items from command line

Some of the applications on my system run only if they are allowed to run in the background. I want to run these apps only in certain time windows. Due to this, I am manually enabling the app in ...
Chillar Anand's user avatar
0 votes
0 answers
35 views

What is this zsh file generated unintentionally every time I use zsh

The file name is zsh.<computer_name>.local.<random_numbers>. In this case it is zsh.macbook.local.754. It started appearing after I moved all zsh files in the home directory to ~/dotfiles/...
lightbluepoppy's user avatar
2 votes
1 answer
79 views

How to pass file expansion patterns across an ssh/rsync connection

I'm new to macOS but I have some experience in Linux. Now I am encountering some problems with different styles of command lines between macOS and Linux and I hope someone can help me. In Linux, if I ...
Jiaqing's user avatar
  • 21
0 votes
1 answer
47 views

screen utility (terminal app) installed on my mac and I don't know where it came from. How to uninstall it?

I have homebrew installed on MacOS Big sur. However, when I type brew search screen, homebrew clearly shows that the screen terminal app is NOT installed on my Mac through homebrew. However, in MacOS ...
DanRan's user avatar
  • 620
7 votes
3 answers
1k views

Terminal: How to move files to the last used directory conveniently?

I googled to no avail and could not find any example. For example, if I want to move files to the current dir I can use . But what if I am in ~/foo and cd into ~/foo/bar/xyz/dir and want to move, say, ...
mariano-daniel's user avatar
2 votes
0 answers
52 views

What tools come pre-installed on Mac; what is part of the Xcode command line tools; and what should I install myself?

I'm setting up my Macbook, and in the process of installing Homebrew, I installed the Xcode commandline tools. I'm assuming the result of this is the /Library/Developer/CommandLineTools directory, ...
CalicoJack's user avatar
1 vote
2 answers
59 views

mounting a bit by bit copy of a partition in macos

Is it possible to mount a bit by bit copy of a partition in macos? I tried with mount -t apfs backup.img backup/, but it didnt work. Is there a better way?
CarriMegrabyan's user avatar
0 votes
0 answers
68 views

Command line on IOS IPad Air 4 (I’ve been hacked)

I have found multiple instances where the only possibility is that I am being remotely hacked through screen mirroring. I believe this for the following reasons: Remotely I have found open tabs/...
Sick and tired of being hacked 's user avatar
0 votes
1 answer
29 views

Could a 163-bytes size difference between the tgz of two different 590mb dirs be caused just from file metadata? Or is the file data diff?

While trying to remove duplicates of MRI readings I am tarring / compressing (tgz) the top-level directory with a mix of executables, pdf, text, dll, and data in proprietary format (but sometimes with ...
minatojin's user avatar
-3 votes
0 answers
73 views

sudo spctl master disable command not found [duplicate]

I have transferred information from my intel 2019 MacBook Pro running I THINK Catalina to an M2 Max MacBook Pro running Ventura and would like Apple to stop telling me what I can do with my own ...
malldatexoxo's user avatar
0 votes
1 answer
42 views

Convert passwordLastSetTime to date format YYYY-MM-DD on macOS Monterey

The code below from Convert passwordLastSetTime to date format YYYY-MM-DD works great on macOS Ventura machines to convert the date for when the password was last set on a user account. But when using ...
MPL's user avatar
  • 37
0 votes
0 answers
15 views

Apple Mail: display original sender instead of Siri's detected one

I need to change Apple Mail's Viewing > Use Smart Address setting via command line, to deploy via MDM. Apparently, this setting is AddressDisplayMode and resides in ~/Library/Preferences/com.apple....
Maxxer's user avatar
  • 156
0 votes
0 answers
46 views

Set Mission Control keyboard shortcuts via cmdline

Is there a way I can set my keyboard shortcuts for Mission Control from the cmdline / programmatically without having to use a mouse? I have changed the keyboard shortcuts such that it behaves similar ...
John Doe's user avatar
0 votes
0 answers
25 views

Java Error java.lang.UnsupportedClassVersionError

Trying to run java -Xmx4G -Xms4G -jar launch.jar but that leads to error Exception in thread "main" java.lang.UnsupportedClassVersionError: launch.jar has been compiled by a more recent ...
W. Bismarck's user avatar
1 vote
1 answer
28 views

GTK4 + brew + m2

I am having a lot of problems trying to run code made with GTK4 previously made on an intel Mac. I made the code in pure C using GTk4 for a gui. I needed to configure my path back on those days and ...
mrmurmanks's user avatar
0 votes
0 answers
21 views

How does the TTL field work for Unified Logs?

Running log stats --overview yields the following summary of all the logs on a mac. Comparing the start and end timestamps to the lists of TTLs, I don't understand how these work together. If there ...
Josh Brower's user avatar
1 vote
0 answers
58 views

Infinite "bin:/usr/local/bin:/usr/local:/bin" in Terminal

2 Updates: I updated bash shell to Zsh with "chsh -s /bin/zsh" which seemed to do something. I no longer get [Process Completed] or an infinite loop. Just a large block of text when typing /...
Smackanacho's user avatar
0 votes
1 answer
42 views

Mac Pro with Startup Security Utility

hi I am trying to remove or disable Startup Security Utility in terminal, does anyone know any commands that can do this so I can reinstall from an external device, for some reason internet recovery ...
kevin murray's user avatar
1 vote
1 answer
80 views

Cannot ssh into machine?

I have a Mac that for some reason I cannot manage to ssh into anymore. I'm completely stumped and am looking for ideas of what to try next (short of reinstalling the whole system). I've tried the ...
Martin's user avatar
  • 119
0 votes
1 answer
50 views

Mac Terminal and applications version installed

I have the zsh in Ventura OS. I know that I have already installed the following apps: Books.app (which came already in the system) Brackets MAMP (Package for MySQL, Apache and PHP) Adobe Photoshop ...
limakid's user avatar
0 votes
0 answers
39 views

Mac M2 default terminal in VSCode not working as expected [duplicate]

Step by step: In VSCode I've set the default terminal (Command + Shift + P -> >Terminal: Select Default Profile) to bash (/bin/bash). Close all terminals, open a new one (Control + Shift + `) ...
JoelBonetR's user avatar
10 votes
1 answer
2k views

Why did macOS not create a folder in the home directory?

I am using this script to create a folder under the home folder in Terminal like this: #!/usr/bin/env bash set -u set -e set -x directory="~/backup/tex1234" if [ ! -d "$directory&...
Dolphin's user avatar
  • 915
1 vote
0 answers
93 views

l2ping equivalent on MacOS

Is there a utility like l2ping which can send packets to a known Bluetooth MAC address on MacOS?
user129393192's user avatar
0 votes
0 answers
16 views

How to find the Bluetooth MAC address of a paired device? [duplicate]

Either iOS or MacOS solution please that works currently with the latest software — haven’t found any working solution online, but I know there must be a way.
user129393192's user avatar
0 votes
0 answers
63 views

Mac OS: Execute a command in .zshrc (or .bashrc) only for new windows but not for new tabs

I'm trying to change the "default working directory" for Terminal.app and it seems that is not possible (from my research so far). I could achieve this using ~/.zshrc (by adding "cd ~/...
Ajay A's user avatar
  • 45
1 vote
2 answers
261 views

default Nano Editor in MacOS is scrambling text display, not displaying text correctly with both bash and zsh. How to debug and fix?

I am running MacOS Big Sur 11.7.9. Recently my nano editor stopped displaying text correctly using bash or zsh, and it scrambles text and doesn't properly display text. How can I debug and fix this ...
DanRan's user avatar
  • 620
1 vote
2 answers
61 views

Convert passwordLastSetTime to date format YYYY-MM-DD

Trying to convert passwordLastSetTime to date format YYYY-MM-DD The command is: dscl . read /Users/<username> | grep --context=3 passwordLastSetTime I want to convert this number to YYYY-MM-DD ...
MPL's user avatar
  • 37
0 votes
0 answers
57 views

On Ventura, running rsync from launchd gives permissions error

This problem is similar to questions at the following: rsync errors, but only when run in launchd rsync "Operation not permitted (1)" error only when run in launchd Permissions errors when ...
Jeffrey Simon's user avatar
1 vote
0 answers
29 views

Manage "open at login" items programmatically from CLI

I'd like to control a Java (not swift / native) application startup during login. While I can add plists-s to user's LaunchAgents, this does not show up as a login item in system settings. How can I ...
martin's user avatar
  • 121
1 vote
2 answers
169 views

defaults delete is not working

I've made a bit of a mess with my Mac (macOS Ventura 13.5) whose shell is zsh. The problems started when I used python syntax to run commands, as it's a requirement apart of the project I'm doing to ...
Anagonye's user avatar
1 vote
1 answer
114 views

Why isn't sudo authentication in one terminal propagated to another terminal?

When I sudo followed by a password in one terminal and then sudo in another terminal, I have to enter my password again. I am pretty sure it wasn't always like this. If I recall correctly, you could ...
d-b's user avatar
  • 3,236
5 votes
1 answer
435 views

How to make normal command `ls` and the wildcard `*` in Zsh

Let's consider the interaction with Zsh on a Mac: % ls |grep gradle gradle@7 % ls gradle* INSTALL_RECEIPT.json LICENSE NOTICE README bin ...
Ernest Frankly's user avatar
1 vote
0 answers
24 views

Shell script needs to open images for viewing/previewing

I have a shell script that is going to open two images and then use "&" to return focus to the script. qlmanage is not suitable for sever reasons, but the biggest problem is the ...
John O's user avatar
  • 381

1
2 3 4 5
61