Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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
1 answer
28 views

Using Imagemagick commands in Automator with passed images

I am trying to make a workflow in Automator that takes video screenshots and ideally at the end montages them into one image. I have the video shot working, and is saving into a timestamped folder, so ...
Tom Howard's user avatar
0 votes
1 answer
47 views

Warning when installing npm using MacPorts I don't understand/what to do with?

I just installed npm10 with MacPorts. At the end of the installation I got this warning: It is not recommended to install packages globally. But if you do so please be aware that they won't get ...
d-b's user avatar
  • 3,348
0 votes
1 answer
42 views

Shutdown error that cannot be pinned down

Here is the issue in a nutshell: My machine has taken to giving me an error dialog that begins with the following on every restart or shutdown and restart, manual or otherwise: You shut down your ...
nihilon's user avatar
  • 133
1 vote
1 answer
137 views

Copy and Paste Lines in Nano on MacOS

I am on ARM-based MacOS Sonoma 14. For some reason, I have no luck with the 'copy' step from this answer to the same question on OS X. I have tried both with and without the 'use Option as Meta key' ...
shea's user avatar
  • 177
0 votes
1 answer
85 views

How to install Macaulay2 for Mac?

I'm trying to install Macaulay2 in Mac, Im trying to do what the manual says, but I'm stuck in step 4. I write what the manual says but the terminal says function> and I don't know what to write ...
Kevin Duran's user avatar
0 votes
1 answer
122 views

How can I automate via command line a process to prepare video files when my Mac starts?

This is an improvement to previously discussed: Constantly check folder for specific file type and run terminal command with new filename as an argument I used to love Automator for such tasks, but ...
Pavel Pervoy's user avatar
0 votes
2 answers
58 views

Constantly check folder for specific file type and run terminal command with new filename as an argument

I have a folder ~/Downloads I'm checking (using entr) it for .webm videos and when new file is added I need it to be converted to .mp4 BUT can't figure out the arguments passed... ls . | entr ...
Pavel Pervoy's user avatar
7 votes
2 answers
1k views

In Sonoma, how can I run applications in /System/Applications from the command line?

I have a shell script I sometimes use to trigger Mission Control, which is simply the following: #!/bin/sh /System/Applications/Mission\ Control.app/Contents/MacOS/Mission\ Control In macOS 13, this ...
Bri Bri's user avatar
  • 2,508
1 vote
1 answer
186 views

Convert absolute paths into relative path for rsync

I try to sync to folders, but with exceptions made by tags. So I learned, that I need different commands to build up that job. First I create a file of excluded files, which have a tag in orange or ...
Peter Silie's user avatar
1 vote
1 answer
48 views

How do I use terminal emulator to talk to my iPad mini from my Mac?

I have Mac mini macOS Monterey; iPad mini 6 17.2 iPadOS and want to talk to the iPad mini from my Mac mini.
Basis Optional's user avatar
3 votes
2 answers
509 views

pmset repeat cancel does not remove scheduled events

After some time searching, I found this answer: How do I remove 'pmset' auto-wakeup command for my Mac? But the solution is not working for me. I originally had my laptop scheduled to restart at ...
nihilon's user avatar
  • 133
5 votes
1 answer
1k views

What can non-elevated rm -rf /* actually remove on macOS Ventura?

Long story short I am an idiot and ran rm -rf /* on my M2 MacBook Pro running macOS Ventura 13.3.1 while trying to clear out a directory. I was able to cancel it a few seconds after realizing what I ...
Miles Turin's user avatar
0 votes
1 answer
74 views

how to restore terminal commands?

I spent most of the day trying to install Ruby on my MacOs (from 2014, version 10.11.6 -- I can't update to higher). I finally got chruby installed with Homebrew and then tried to follow the ...
Michael 's user avatar
0 votes
0 answers
139 views

Long delays before executing shell commands

I'm using a MacBook Pro 15-inch (2017), macOS Ventura 13.6.3. When I try to run a command, any command, in a shell, there will often be a delay before the command starts, usually on the order of ...
Chad Groft's user avatar
0 votes
1 answer
144 views

Is there a terminal or a setting for a terminal that obeys the usual text editor key combinations like option-backspace?

I'm very surprised that this functionality or even information about it is so hard to find. With the default terminal (in December 2023), the usual editor key combinations like option-backspace to ...
Ray's user avatar
  • 251
3 votes
0 answers
247 views

Can't get X11 forwarding working with XQuartz

I'm on Ventura. I'm trying to log in to a remote Linux machine with X11 forwarding enabled. I followed these steps: Install XQuartz (from the downloadable package on their website, not from brew). ...
Jason C's user avatar
  • 171
3 votes
1 answer
3k views

In Mac OS Sonoma, 'Permission denied' when trying to create a file in the home directory

I'm on the latest Sonoma 14.2 and when in my user's home directory I cannot create a file. I have checked the rights and it looks okay. Sudo works but this is my home directory and it messes with me ...
fredrik's user avatar
  • 133
1 vote
1 answer
57 views

I have uninstalled the 383 MB "gcc" and "brew doctor" does not complain. Homebrew no longer needs "gcc" in 2023? Is that correct?

I have uninstalled the 383 MB gcc and brew doctor does not complain. Homebrew no longer needs gcc in 2023? I have looked at the sizes of my homebrew packages and have therefore decided to uninstall ...
Sybil's user avatar
  • 3,947
0 votes
0 answers
59 views

zsh:killed command grep -q -Fx "$zcompdump_revision" "$ZSH_COMPDUMP" 2> /dev/null

This issue started occurring randomly yesterday and I cannot figure this out. Every time I launch zsh, I get the error mentioned below: zsh: killed command grep -q -Fx "$zcompdump_revision&...
arximughal's user avatar
0 votes
0 answers
59 views

How to easily speed up video in command line?

The only way I know how is via ffmpeg, and the commands are so long and difficult, especially when trying to speed up the video and its audio at the same time and keep them in sync. Is there an easier ...
minseong's user avatar
  • 8,894
2 votes
3 answers
475 views

in macOS terminal, can I display the 'added date', the creation date, and last access timestamp of a file?

In the macOS terminal, when I do ls -l SomeFile.txt it shows most of the file's properties including its last modification timestamp. However in Finder, besides the 'Date Modified' there is also the '...
RocketNuts's user avatar
  • 1,489
0 votes
0 answers
162 views

How to mount a bootable APFS snapshot from command line?

First, I have Time Machine enabled and my aim is to make rclone cloud backups of a snapshot of all locally backed up files, excluding system files. It is mainly non-system volumes and $HOME. I am ...
e40's user avatar
  • 131
0 votes
0 answers
144 views

Cannot get matplotlib to work on M1 mac

>>> import matplotlib Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/danielbak/venvs/hw-ble-venv/lib/python3.9/site-...
Daniel Paczuski Bak's user avatar
0 votes
0 answers
38 views

Reading Command Line Arguments for Shortcut

Problem: I want to run a Shortcut from the command line that outputs a list of reminders that have a specific tag e.g. shortcuts run ReminderTag <<< "myTag". However, I'm unable to ...
naafiyan's user avatar
2 votes
2 answers
76 views

Terminal | Shortcut for Automatically Saving Files Created Using "code"

I have a question regarding a shortcut use of "code". My Goal is to simultaneously: Open a new file in VS Code, and also: Automatically save that new file to my current working directory ...
Drew P's user avatar
  • 21
0 votes
0 answers
37 views

How to play the audio of a .mkv file from a command line from a specific offset to another at different speeds

The first thing I tried was using VLC: /Applications/VLC.app/Contents/MacOS/VLC '{$movpath}' --start-time='{$ts}' --stop-time='{$te}' --no-video rate='0.5' 2> /dev/null; However, the player takes ...
forgodsakehold's user avatar
0 votes
0 answers
34 views

ISL Light macOS remote connection via SSH

I am trying to establish a new tunnel on ISL Light app from ISL Online. I have an account already and on when I log in, in the Computers window I can access a remote server that I am assigned to have ...
adriB's user avatar
  • 1
1 vote
2 answers
152 views

zsh - Sort files expansion in MacOS Terminal like in Finder: numerically and case-insensitively

Is it possible in MacOS Terminal to have the sort order numerically and case-insensitively, almost like in Finder? I'm on MacOS 14 Sonoma, using Terminal app with zsh 5.9 and oh-my-zsh. I'm trying to ...
Dmitrii Kuznetsov's user avatar
1 vote
1 answer
74 views

How do I disconnect clients on my Mac file server from the command line

I have use a Mac mini (running Ventura) with a connected Drobo as a file server. The file sharing is standard Mac file sharing to other Macs via SMB. I believe AFP is no longer supported, or no longer ...
Vihung's user avatar
  • 412
0 votes
0 answers
57 views

How do I use Zathura after Homebrew installation?

Command line newbie here. I was looking for a PDF/EPUB reader that didn't annihilate my retinas, and looked like Zathura was a good option since others didn't seem to have dark mode. I installed ...
J. Fernwright's user avatar
3 votes
0 answers
144 views

.zsh_sessions producing an error [duplicate]

Each time I open Terminal, I get an error: /Users/myname/.zsh_sessions/SESSIONID.session:2: command not found: Saving in each of the windows I set to open by default. This seems to have appeared a ...
Hugues's user avatar
  • 523
0 votes
1 answer
48 views

What does the 'ps -o cputime' show in the TIME column?

The macOS ps gives the TIME like this: UID PID PPID C STIME TTY TIME CMD 0 50769 80598 0 9:09pm ttys000 0:00.00 egrep 96222|PID 666 96222 95653 0 10:09pm ttys006 0:00....
Peter Brooks's user avatar
1 vote
1 answer
154 views

One app, two dock icons, with separate command line arguments?

Is it possible to have two icons for Firefox in the dock (the app list at the bottom of the screen)? I'd like to have one icon to start one profile (say, "dad's Firefox profile") and another ...
noughtnaut's user avatar
9 votes
4 answers
3k views

Apple Terminal startup errors (session save/restore)

Recently (possibly with the Sonoma update, but possibly even more recently than 14.0), Apple Terminal has been giving the following error on startup (when macOS is set to restore windows, i.e., when ...
Andrew Jaffe's user avatar
1 vote
1 answer
102 views

How to upload file to Google Drive using duck?

I usually access my Google Drive using Cyberduck. So far, no problem with creating folders, moving files, etc. Then I noticed it has a command line interface called duck. Should be handy since I work ...
anta40's user avatar
  • 249
1 vote
2 answers
455 views

Command to format a raw floppy disk image with FAT12?

I'm new to OS Development, and I want to format a 1.44MB floppy image with the FAT12 file system. I created the disk using dd if=/dev/zero of=<my image> bs=512 count=2880, so it's just a raw ...
axolotlKing0722's user avatar
2 votes
1 answer
68 views

Relationship between binary and it's dependency dylib

With my understanding, if a binary(ex. rsync) refers(depends on) static library (libxxx.a) and the libxxx.a is updated, a binary have to be re-compiled to reflect libxxx.a's update. Is it correct? And ...
xanadu6291's user avatar
1 vote
1 answer
73 views

GUI File Manager to show line count for all files

Are there any GUI file managers like finder or any other file managers, which will show file row count? I can see the row count from cli, using wc but I don't want to use cli all the time. GUI is ...
Chillar Anand's user avatar
1 vote
1 answer
2k views

Homebrew not installing correctly

I was installing homebrew through the .pkg to install GNU Emacs, and it did not run after installation. I ran brew help and it outputted zsh: command not found: brew. Command Line Developer Tools were ...
Average Terminal User's user avatar
2 votes
1 answer
1k views

Failed Homebrew Installation

I was trying to re-install homebrew on my Mac. I used the following command. /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" I got the ...
Mdick's user avatar
  • 21
1 vote
2 answers
122 views

Creating a FAT32 SD card image (.img) out of a directory using command-line tools

I'm writing a program which is meant to be loaded and run exclusively from a FAT32 SD card. I need to create an SD card image for distribution as well as for testing the storage and retrieval of files ...
AcinonX's user avatar
  • 113
2 votes
1 answer
115 views

How can I specify the window size for Emacs on a Mac?

I used to be able to launch Emacs version 28.1 on macOS from the command line in XQuartz terminal window like so: /Applications/Emacs.app/Contents/MacOS/Emacs --geometry 109x65 & After upgrading ...
Timur Shtatland's user avatar
0 votes
2 answers
53 views

Command-line gunzip on macOS 12.7 Monterey (M1 Mac mini) gives OK with gunzip -tv filename.gz and NOT OK with gunzip -ltv filename.gz

The situation: The file php-8.2.11.tar.gz is downloaded from https://www.php.net/downloads.php At the command line, running gunzip -tv php-8.2.11.tar.gz gives output which includes OK. However, ...
Richard's user avatar
0 votes
0 answers
336 views

Calculate process memory usage as percentage

I want to calculate the memory usage as a percentage for some processes on the device. That is, how much percent of total memory a particular process is taking on the system. (Need it for reporting ...
user508046's user avatar
1 vote
1 answer
121 views

All files in directory filename character removal script bug

I'm trying to use this question to rename all the files in a directory and keep only [a-zA-Z0-9. ] (last character is a space). The terminal entry I'm using is: for file in /Users/bob/Downloads/videos/...
Craig's user avatar
  • 189
1 vote
0 answers
92 views

How to run pkg installer asking for password in GUI rather than in shell

I tried to use osascript but no luck: > osascript -e 'do shell script "installer -pkg /Users/syabro/Downloads/Crystal_Software.pkg -target /" with administrator privileges' 0:117: ...
syabro's user avatar
  • 111
1 vote
0 answers
391 views

Adding own certificate authority to macOS

I currently facing the problem that I created a certificate authority certificate and would like to add this custom CA to macOS. The general way would be to add it to the "System" area in my ...
user182351's user avatar
1 vote
0 answers
69 views

Is there a safe way to softly shutdown iMac via start-button?

I use my iMac 2011 in Target Display Mode under High Sierra, to use it as an external display for my M1 MacBook Air from 2020. (works well, despite Apple websites say newer than 2019 is not supported)....
TheGlasses's user avatar
1 vote
1 answer
187 views

Test printer online/offline in terminal?

Some years ago, the lpstat command would report if a printer is offline. This features seems to have disappeared; it doesn't seem to be available in Ventura. Is there a way to determine from the ...
emendelson's user avatar
1 vote
0 answers
61 views

How does mdfind (filename) pattern matching work? Punctuation in the search string gives non-intuitive results

There are multiple ways to use mdfind to find files with a given name; here are two that work in some cases: mdfind -name barfoo mdfind "kMDItemFSName == '*barfoo*'c" The former finds ...
Erik Johnson's user avatar

1 2
3
4 5
65