A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Questions tagged [terminal]

Questions about the Terminal application or its terminal emulation should use this tag. Use **command-line** for questions about shells or command-line programs that do not specifically involve Terminal.

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

How do I remove/delete a (possibly corrupt) partition from macOS High Sierra?

I have a partition (disk0s2) I can't seem to get rid of. The size is very tiny around ~3KB. Disk Utility is unable to remove/erase or repair this partition. Also, the '-' button seems to be disabled. ...
0
votes
0answers
8 views

Is there a way to disable dragging (drag-n-drop) in a read-write dmg file?

I´m creating a dmg image that should be able to use drag-n-drop of a folder onto an application. The user installs my app by dragging a folder onto an application (.app) that is made by Automator ...
0
votes
1answer
28 views

Return only one line per file with grep in Terminal

Various posts in other forums have suggested that the best way to use grep to return a single line per file is using -m 1, which is the --max-count option. However, when I write the following line, I ...
0
votes
1answer
39 views

Why does `ps -e` display information about the current user's processes?

I'm currently on macOS Catalina: nlykkei:~/projects$ sw_vers ProductName: Mac OS X ProductVersion: 10.15.2 BuildVersion: 19C57 I wonder why the -e (identical to -A) option of ps displays ...
0
votes
1answer
45 views

how to automate / run 'brew cask upgrade' as a cron job?

I wish to run brew cask upgrade in a cronjob, but it prompts for a password. When I run the job as root all permissions are screwed up. Howto run that command in a cronjob env? I use zsh. ~ brew ...
6
votes
1answer
498 views

How Do I Upgrade VirtualBox from the Command Line

I need to remotely log into a Mac to upgrade VirtualBox. The problem is screen sharing is just abysmally slow and I don't want to use 3rd party screen sharing utilities. I prefer to do this in ...
0
votes
1answer
41 views

In Automator, can I combine 2 or more variables into a new variable?

First off, let´s set the scene. I am trying to make a small applet (.app) to include in a DMG-file for distribution. The .app file will only activate when a user drags a folder with my product-files ...
3
votes
1answer
633 views

What is the command to copy a file from a directory to another directory in Mac OS?

The command that I'm trying to execute for copying a file to a directory is given below : cp /Users/anish/.m2/repository/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1 /Volumes/Local Disk/...
0
votes
0answers
34 views

How to log out of iCloud via Terminal and keep files from iCloud saved without deleting? [closed]

I have a Mac mini 2010, the operating system is MacOS Sierra 10.12.6 I have my iCloud files stored at /User/JohnDoe/Library/Mobile Documents which I intend to keep, even though they're old (2012 to ...
0
votes
0answers
31 views

Select HomePod sound output from Terminal

I'm trying to create a script that will switch my Mac Pro's sound output to my HomePod. I've installed SwitchAudioSource and I can only 'see' the HomePod when it's currently selected as the output. ...
0
votes
0answers
16 views

Suppress converting “hyphen minus” in man-db

I have MacOS Catalina. In MacOS $ /usr/bin/man -v man, version 1.6g have some problem with some man pages from HomeBrew (tmux for insance). And so I installed man-db from HomeBrew: $ brew info man-...
2
votes
1answer
50 views

-bash: /usr/local/bin/nmap: Bad CPU type in executable

I recently update my Mac OS to Catalina 10.15. I ran nmap I kept getting -bash: /usr/local/bin/nmap: Bad CPU type in executable I've tried reinstalling it brew uninstall nmap brew install nmap ...
0
votes
0answers
25 views

Is it possible to AirPlay my Mac's desktop to an Apple TV via the command line?

I'm ultimately trying to automate a process which AirPlay's a Safari browser to an Apple TV. I'm familiar with the say -a "AirPlay" command which only AirPlay's audio so I was hopeful that there could ...
0
votes
0answers
46 views

command silently failing when running from the root's crontab

I have a script that runs diskutil and since diskutil needs permissions to run I'm running the script from the root's crontab. Steps: sudo su root crontab -e sh /test.sh Nothing ever happens ...
0
votes
2answers
39 views

npm install -g react-native-cli does not work: EACCES: permission denied

I'm trying install react-native-cli in My MacBook. Executing this command in my terminal npm install -g react-native-cli Getting this error npm WARN checkPermissions Missing write access to /usr/...
1
vote
1answer
59 views

brew search generates mail notification “You recently used a password to access an endpoint through the GitHub API using Homebrew/2.2.2”

I got a mail from GitHub: You recently used a password to access an endpoint through the GitHub API using Homebrew/2.2.2 (Macintosh; Intel Mac OS X 10.15.2) curl/7.64.1. We will deprecate basic ...
0
votes
0answers
24 views

Attention- *Komplete Kontrol MK2-49 S/Logic Pro X-Core processor /Komplete 11 12 [closed]

SecurityI am trying to get my Mac working again like it was before updating the Os to Catilina.I am a producer and professional recording artist with a deadline.I notified Apple that Native ...
1
vote
1answer
81 views

MacOS command-line security updates: equivalent for apt-get update all

I am accustomed to updating systems with sudo apt get update and would like to ensure MacOS security updates are installed from the command line. This `software update' command was issued on my ...
2
votes
0answers
68 views

Can't run python script from Automator on Catalina “Operation not permitted”

I have a service in Automator that I pass a folder and it runs on every file in the folder. It uses a python script to read the album field from an mp3's id3 tags and write it to the Finder comment ...
0
votes
0answers
46 views

MacBook Pro mid 2012 keyboard issue

I'm using MacBook Pro 2012 model with macOS Catalina. A few keys (I don't know which ones exactly) key on my built-in keyboard seems to be pressed continuously. I have disabled the internal keyboard ...
0
votes
1answer
52 views

How to restore default Apple Version of Git after renaming it in Mac OS Mojave and linking git to homebrew version?

I wanted Mac OS to use my homebrew version of git after brew install git. So I mistakenly renamed my Apple Default git by doing: $mv /usr/bin/git /usr/bin/git~apple $ git --version git version 2.25.0 ...
0
votes
1answer
31 views

Terminal command to show FileVault and Firewall settings

I'm as a system admin and a big pain is physically checking people's private MacBooks for FileVault and firewall settings. Is there a way to get the Terminal to output the FileVault and Firewall ...
0
votes
1answer
84 views

Add colours to output of existing CLI commands

I would like to create a function / alias that colorizes the output of another command. Is there a best-practice way to do so? For instance, let's take the alias command, whose output looks something ...
0
votes
1answer
49 views

Delete Duplicate Users Folder Catalina

Due to issues while upgrading to Catalina a duplicate users folder was created on my system. This folder is named "Users 1" and is ~85gb. I tried deleting it using sudo rm -rf "Users 1" but get Read-...
0
votes
0answers
40 views

Running “do script” synchronously in AppleScript

I have the following AppleScript that I run on login: on run {input, parameters} tell application "Terminal" do script ".../MyScript.sh" end tell return input end run I run ...
1
vote
0answers
32 views

Change chmod from /sbin/shutdown

I'd like to change the rights of the shutdown executable from 751 to 750, because I'd like non-admin users to have no right to shutdown their Macs. Except I have the chmod error: Unable to change file ...
0
votes
1answer
90 views

Terminal loop command to change created date for all files in a large directory

I have a directory with roughly 3000 video/subtitle files nested in slightly varying levels of sub directories that I would like to change the 'date created' on. Almost every file has a year in the ...
0
votes
1answer
63 views

Turn Bluetooth On & Off via Terminal [duplicate]

I'm trying to find out how to turn Bluetooth On or Off by using the Terminal on macOS Catalina. I used to be able to do it with the following commands: alias bton="sudo defaults write /Library/...
0
votes
0answers
34 views

The command shortcuts close all windows and temporarily blanks the desktop on my iMac

Essentially what happens to my late 2015 iMac is that when I use my command shortcuts and the down arrow anywhere (except command+b which just worked), all my windows close and my desktop temporarily ...
1
vote
1answer
44 views

Why automator's component “Get Selected Finder Items” duplicates path of selected file?

I'm trying to make automator quick action/service for coping text from images. It looks like this: When I run script from automator everything works fine. But when I try to run it from services menu ...
1
vote
0answers
16 views

How to install “fonts available for download” from terminal

In this article, it says: Fonts available for download in Mojave To download and enable any of these fonts: Open Font Book from your Applications folder. Select All Fonts in the ...
1
vote
1answer
120 views

How to set “default” .bash_profile when opening Terminal on Catalina

I'm running Catalina, 10.15.2, which uses the new zsh shell as a default. I've created my own .bash_profile file in my home directory and I'm able to initialize this .bash_profile by typing: source ....
0
votes
1answer
87 views

I know the sudo password, can I use sudo and install software without logging out and switching to the admin user?

I have two accounts on my MacBook (runs Catalina 15.1), one is admin, one is non-admin. Both are mine, so I know the password for both. Sometimes when I want to run some 'sudo' command or use the ...
0
votes
1answer
72 views

Mounted volume not accessible

I'm trying to mount an external volume: /bin/mkdir -p /Volumes/share /sbin/mount -o nosuid,-d=777 -t smbfs //user:pwd@host.local/share /Volumes/share The script runs as a Daemon, no error. The share ...
2
votes
0answers
54 views

Run a command without opening the terminal

Is it possible to start a terminal command without opening the terminal first? I have some quick commands, and for those I open the terminal window, run the command, and close it again. I generally ...
0
votes
1answer
15 views

trying to run FSF emacs in character based mode ( -nw ) on Catalina

After installing Catalina on my laptop emacs vanished so I installed the latest version from FSF. Running it in a window (gui mode) works fine but I can't get it to reliably work in character mode in ...
0
votes
0answers
19 views

How to create an IKE PSK VPN connection using console only?

In Apache Cloud Stack, user can easily create StrongSwan based VPN endpoints allowing connections using the following credentials: VPN endpoint user name user password preshared key string PSK Is ...
1
vote
0answers
36 views

Repair Disk Permissions in Terminal seems to hang

OK, I tried following (OS X Yosemite) the instructions here https://support.apple.com/en-us/HT203538 And I went into Terminal and typed in the following diskutil resetUserPermissions / id -u But ...
2
votes
1answer
85 views

How do I gain write permission for the defaults shell command?

I recently migrated to a new Macbook. If I do a $ defaults write ... in my shell, I get an error shaped like defaults[12608:79345] Could not write domain Apple Global Domain; exiting. Using sudo ...
2
votes
1answer
74 views

Process completed after opening terminal

I am running a bioinformatics course that gave the following instructions to setup my previously non-existing bash profile: You will need a few lines in your setup files. Open a Terminal and run ...
1
vote
1answer
51 views

getting `pip` to use `python3` instead of macOS-supplied python2?

I don't really know much about python or pip so this may be an easy question but I’ve looked around and don’t really see an easy to understand solution, and the deadline is coming up soon, so it seems ...
1
vote
1answer
59 views

Batch Removal of “Where from” Metadata Without a Handler

I have many images that contain the "Where from" metadata in the "get info" section that shows the URL where they were downloaded from. I want to remove this information from all of them at the same ...
1
vote
1answer
80 views

Process completed immediately after opening Terminal and impossible to add commands

Since I have made some changes on my .bash_profile document, when I open my terminal I got this message and I cannot add any command : Last login: Thu Dec 19 10:02:58 on ttys000 [Process completed] ...
0
votes
2answers
44 views

Can't Rename Images Sequentially Via Applescript Because Other Images Already Have That Name

I am trying to automate batch renaming of images sequentially by using a simple Applescript. But I am having difficulty telling the script that there are images in the same folder that already have ...
2
votes
1answer
52 views

How do I set the working directory as the tab title in Terminal for Mac?

One of my Macs is running Mac OS Mojave and so for parity with my Catalina machine I switched the shell to zsh. Not sure exactly when but at some point I noticed the current working directory was ...
0
votes
0answers
10 views

Does mac have an equivilent of pressing '1' while using the top utility in Linux? [duplicate]

On a linux device if I want to see active processes from the terminal I can type 'top'. If I want to see these processes split by processor I can then press 1 while top is open. On my Ma when I press ...
1
vote
1answer
39 views

How to rename volumes from Terminal without name limitations?

When a FAT volume is mounted I can click on it and rename it freely. However via terminal it is very restrictive. % /usr/sbin/diskutil rename "Nice Name" "Nicer Name" Nicer Name does not appear ...
0
votes
1answer
89 views

Having Issues Renaming Files That Are Moved From A New to Old Folder via Applescript [duplicate]

Ok so this is a complex script that I hope someone out-there can help me with because I have spent the entire day trying to figure this out. Lets say I collect cat images from Instagram and I have ...
1
vote
1answer
25 views

Where are iCloud documents stored in the file system? [duplicate]

Where are iCloud documents stored in the file system? Under Finder you can find the iCloud directory, however 'Get Info' gives absolutely no clue as to where these files are located in the file ...
0
votes
0answers
11 views

How to selectively remove sym-linked files from a certain directly

In /usr/local/include , symlinked files from ../Cellar/ and /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ as follows; rwxr-xr-x 1 user admin 48B May 29 2018 unitypes.h -&...