Questions tagged [macos]

macOS (previously "Mac OS X" and "OS X") is the Unix developed and distributed by Apple Inc. since 2001.

Filter by
Sorted by
Tagged with
2 votes
1 answer
23 views

Adding/permitting "staff" to read/write in folder

For some reason, there isn't "staff" user group on a folder that I just created. How do I add/permit "staff" user group to a folder that I just created? This post, seems to suggest ...
user avatar
0 votes
0 answers
6 views

Is there any brew app or whatever that can format disks using HFS+?

I have several external USB HDD disks that I let macOS format on APFS. Like most of you know, APFS is for SSD disks and this format, fragments HDD disks to hell, making them 20 or more times slower ...
user avatar
  • 4,214
0 votes
0 answers
7 views

Cannot properly send email in MacOS via postfix

Telling story short. My MacOS version is: 12.4. In /etc/postfix/: In sasl_passwd i have: smtp.emailsrvr.com:587 <myEmail>:<password> In main.cf i have: # custom POSTFIX email sender ...
user avatar
1 vote
1 answer
46 views

How to send output to next input line?

This my snippet alias hst="history 1 -1 | cut -c 8- | uniq | fzf ". when I run hst The output is $ ~ hst (the output from hst) $ This is what I want $ ~ hst $ (the output from hst) Example ...
user avatar
0 votes
0 answers
27 views

Is there a faster way to copy from terminal on macOS?

I just copied 1TB of files, zillions of them, from one external USB disk to another and it took 2 days over 5GBPS USB. I have used rsync. rsync seems to me to be serial, I mean, one file at a time. I ...
user avatar
  • 4,214
1 vote
1 answer
20 views

What is the equivalent of "task_struct" in linux's <linux/sched.h> for Mac OS?

I want to understand the Process Control block of Mac OS and Linux. For Lionux it was pretty strightforward, there was a post here asking about the same thing and someone replied to go take a look at &...
user avatar
0 votes
0 answers
7 views

Copying an APFS partition to another disk

I have a disk with two containers. First container contains a time machine disk. Second container contains two partitions, one for time machine (that is from another computer) and another partition I ...
user avatar
  • 4,214
1 vote
0 answers
22 views

Under what conditions are unix (Mac OS ) sytem calls restarted after getting interrupted by a signal ? What do the man page mean by "calls committed"?

I'm reading a book on unix systems and I'm at the part where signals are discussed. I'm a bit confused when it comes to what happens when a system call is running and a signal is received. It says ...
user avatar
0 votes
0 answers
12 views

Localhost (http-server) not loading on MacOS Sierra 10.12

I'm trying to run a private server on my mac using http-server. I thought it would be easier to use than apache2, because using apache2 the localhost page couldn't load. But the same issue occurred ...
user avatar
-4 votes
0 answers
47 views

(grep -o 'a' Acount.rtf | wc -l) Why isn't this working? Nothing is returning [closed]

Why is (grep -o 'a' Acount.rtf | wc -l) not working on macOS for counting all the a's in that file? I'm using zsh. Could someone help me out, please? The file has been saved, and the command returns &...
user avatar
0 votes
1 answer
30 views

Network Activity on Mac OSX Monterey not showing all processes

My network activity is showing that I'm downloading huge amounts of data that are not showing up in my activity monitor. Is there a program I can use that actually works? I tried launchctl list but ...
user avatar
1 vote
1 answer
43 views

Terminology: terminal command to be invoked from any directory?

Context: macOS Catalina zSh. The end goal is to be able to setup user scripts so that they can be invoked via CLI at an arbitrary data location. Question: What is the word (Terminology) for: the ...
user avatar
  • 1,114
0 votes
2 answers
41 views

How to get 'man gfind' when I enter 'man find'?

On my new-ish mac os/Darwin system, my find tool is an 11-year-old BSD version. I have used MacPorts to install a more current version: GNU's find, which MacPorts has named gfind, and placed in /opt/...
user avatar
  • 2,196
0 votes
0 answers
11 views

How to interpret the output of "ls -lO" flags on OS X? [duplicate]

This answer says you can list the flags of a file on OS X with ls -lO. However, how to interpret the output? Here is an example: $ ls -ldO Library drwx------@ 72 foo staff - 2304 Feb 2 20:02 ...
user avatar
  • 101
0 votes
0 answers
36 views

ls -ltr and ls -lt inside an sftp session are giving the same sort order

I am using sftp from a Mac to a linux server. The directory of interest contains several files named file_*datetimestamp* that were created on different datetimes in addition to files named ...
user avatar
  • 1
0 votes
4 answers
91 views

Is it possible to use options -i and -E simultaneously in sed?

I have a file like public class Constants { public static final String PACKAGE_VERSION = '1.24.0.1'; } I am executing the script sed -E "/PACKAGE_VERSION/s/\'([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)\...
user avatar
  • 105
1 vote
0 answers
21 views

Mac OS - specified driver could not be loaded

Objective Goal is to use an odbc connection between bigquery and excel. However, excel can't find the driver per the error image below. Steps taken so far: download odbc driver from google partner ...
user avatar
1 vote
1 answer
52 views

ifconfig/ip link show- how to get only Hardware interface

How do you get only hardware interfaces Tried: ifconfig -a ip link show How do you get only local hardware interfaces using ifconfig/ip link show? Like from my ifconfig I get(removed a lot): en0: ...
user avatar
  • 115
0 votes
1 answer
42 views

Process status logic

How can a process have a status when only threads are being scheduled (Windows and Linux)? Let’s say we create process P Thread T1 is now allocated as well T1 is now in runnable state Scheduler picks ...
user avatar
0 votes
0 answers
17 views

System freezing and apps crashing

I have Macbook pro 2012, I use on it linux sytems (Arch or Debian distro) and also macos catalina. I have problem after install system and starting to use it. System start freezing sometimes and apps ...
user avatar
0 votes
1 answer
52 views

Is running MacOS software on Linux better than running Windows software on the latter? [closed]

MacOS's kernel is based on FreeBSD, Darwin, and a few other forgotten ones, all of which are monolithic, I believe. However, the current MacOS kernel, XNU, is hybrid, which is one of the things that ...
user avatar
  • 11
0 votes
0 answers
63 views

Couldn't download an URL using curl or wget but it works in browser

I'm trying to download the below URL via terminal: https://wallpaperaccess.com/download/8k-graphics-4312822 I tried the below methods: curl -L "https://wallpaperaccess.com/download/8k-graphics-...
user avatar
  • 13
3 votes
2 answers
378 views

tr command unable to process colour output piped from grep

I'm running macOS 12.3.1 I added a couple of lines to my .zshrc, viz. export GREP_OPTIONS='--color=always' export GREP_COLOR='1;35;40' After this, when I pipe grep output to tr, it returns the same ...
user avatar
  • 83
1 vote
2 answers
46 views

Couldn't get sed to match a group

I'm trying to do the below: echo "/Users/anon/Applications/Chrome Apps.localized/Spotify.app" | sed -E 's:([^\/]*$).*:\1:' which I assumed would capture Spotify.app and replace the entire ...
user avatar
  • 13
1 vote
1 answer
38 views

how to hash a directory

looking to compare two directories to make sure they are identical, looking for a script for mac terminal that hash the directory producing a sha 256 hash value that way I can manually verify all exit ...
user avatar
1 vote
0 answers
20 views

Best filesystem for accidental external disk disconnects? [closed]

I have an external disk that is connected to the monitor that acts as a hub and then to my laptop. I rarely copy data to/from disk, but it's really convenient to just have it there when I am at my ...
user avatar
  • 111
0 votes
2 answers
81 views

looking to compare two different directories using the hash values of files within the directories

looking to compare two directories by checking the hashvalues between all the files in each directory and determine if the two directories are == to each other using the sha256 hashvalue
user avatar
0 votes
1 answer
22 views

How can I suppress *:// from tab completion suggestions for 'open'?

I have experience this in OS X in zsh shell, man page for open. $ type open open is /usr/bin/open $ man open OPEN(1) General Commands Manual OPEN(1) ...
user avatar
  • 229
0 votes
1 answer
33 views

macos monterey: PF load anchor syntax error

I am trying to make a NAT interface to connect tap0 to the internet for QEMU. So far I've made a bridge and connected tap0 to it: sudo ifconfig bridge1 create sudo ifconfig bridge1 addm tap0 sudo ...
user avatar
0 votes
0 answers
12 views

MacOS : ditto utility - does an equivalent library exists?

I am looking for an opensource library for the ditto utility. Basically I wanted to preserve all the extended attributes, ACL and every other stuff which could be associated with a file, saved and ...
user avatar
  • 101
3 votes
6 answers
496 views

Convert the first letter of all "."-separated parts of a filename to uppercase except for the last one in Mac Bash

I want to change the filename in the Mac Bash to initial capital after every dot/period, except for the filename extension. Input string example: one.two.three.four.txt Desired output: One.Two.Three....
user avatar
0 votes
1 answer
28 views

Which file(s) are being sourced while opening a terminal on Mac?

So there are these files, which are being known for keeping environmental variables, aliases, custom shell functions etc.: .bash_profile .bashrc .zshrc and after installing oh-my-zsh (which I'm using)...
user avatar
  • 101
0 votes
0 answers
36 views

Passing each line of a text file to a python script and displaying the result

I am new to programming. I usually know enough to search for an answer, but this time I am struggling. I started PicoCTF yesterday. My problem comes from overthinking a solution to the following ...
user avatar
3 votes
2 answers
298 views

diff program gives false positive for files with non-ASCII characters in filename

Example: % diff "/Volumes/New Volume/4kyoutube/" "/Volumes/New Volume/tmpmusic"| grep Distortion Only in /Volumes/New Volume/tmpmusic: ZAC & Bäkka - Distortion (Original Mix) [...
user avatar
1 vote
0 answers
16 views

Set efivar SystemAudiVolume in Linux from recovery mode in MacOs

I tried getting rid of the anoying startup sound in linux like described in this answer from the MacOs recovery mode. After setting nvram SystemAudioVolume=%00 I rebooted the system and logged into my ...
user avatar
1 vote
0 answers
24 views

Permission denied error when using make all-recursive?

I am using autotools and GNU make to build a C library, there is a line all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive In the Makefile, and I get an error compiling make all-recursive make: ...
user avatar
0 votes
0 answers
24 views

Scheduled cron job not running on MacOS [duplicate]

Here is my crontab. 3 13 * * 1-5 * * * * * /Users/smveerap/cron.sh >/tmp/cronStdout.log 2>/tmp/cronStderr.log 0 12 * * 1-5 * * * * * /opt/homebrew/bin/python3 ~/git/bashFiles/gitUpdate.py >/...
user avatar
4 votes
1 answer
79 views

GNU awk --traditional vs --posix

So, GNU awk has some extensions that are missing in the macOS awk. I want to be sure that my awk program also runs on the macOS awk (which I don't have access to). Now GNU awk has two different ...
user avatar
  • 151
1 vote
0 answers
28 views

How to get supply levels of a printer via command line (macOS)

I'm trying to get the supply levels of a printer via the command line. So far I was able to get some information with a lpoptions (marker-message property) command. The problem is that the status of ...
user avatar
  • 11
0 votes
1 answer
41 views

How to make Z shell respect both ~/.zshrc and ~/.profile simultaneously?

I use Z shell on Mac and have some settings in both .zshrc and .profile in my home directory. I found that when I only have .profile, zsh import .profile in a new session; and when I have both ....
user avatar
2 votes
1 answer
86 views

Wildcard expansion doesn't happen when Bash script invoked from cron under macOS

I have a Mac mini running macOS Monterey, and it has InfluxDB running in a Docker container. I'm trying to set up a nightly cronjob via a shell script I'm calling to back the data up, zip it, and only ...
user avatar
0 votes
0 answers
63 views

Permanent SSH tunnel through bastion host

I have the following command that I run locally on my mac to be able to access a DB server trough a bastion host: ssh -L 9234:MYSERVERIP:5432 USER@MYBASTIONIP -i MyBastionPemKey.pem that works just ...
user avatar
  • 101
0 votes
1 answer
62 views

Same make command fails in macOS, but succeeds in Linux

I'm using below Makefile and make publish fails on macOS while succeeding in Linux (alpine, Ubuntu, Debian) with the below error: $ make publish "docker images" requires at most 1 argument. ...
user avatar
  • 287
0 votes
0 answers
27 views

How do I set a master password for macOS terminal?

My friends like to troll me whenever I leave my computer open, they open all apps to make my computer crash, close my chrome tabs ecc. They know a little about tech so I don't want them to access my ...
user avatar
  • 111
0 votes
1 answer
22 views

How to verify that source code does / does not provide driver for Apple USB modem?

Source Code: https://unix.stackexchange.com/a/698474/182280 The goal is to verify that the source code has the driver to support an Apple USB Faxmodem MA034Z/A. What are the keywords or phrases to ...
user avatar
  • 1,114
0 votes
1 answer
45 views

Use conditional formatting in jq

This is a follow up to this question asked by me a few days ago. Say I have this output from a webserver {"status":"OK","result":{"string1":{"variable"...
user avatar
  • 3
0 votes
0 answers
71 views

Getting "unexpected EOF while looking for matching ``'"every time I enter the terminal

I am running the latest version of OSX but this error has been occurring before multiple updates, I am not sure what really causes it, everytime I enter the terminal I get the following: Last login: ...
user avatar
  • 113
0 votes
1 answer
39 views

How do I extract the content of quoted strings of a specific property path from an output?

I have an output from a web server response in JSON which looks like this: {"status":"OK","result":{"string":{"variable":0},"string2":[{&...
user avatar
  • 3
0 votes
0 answers
284 views

error: unknown warning option '-Wno-unused-but-set-variable'; did you mean '-Wno-unused-const-variable'? [-Werror,-Wunknown-warning-option]

I recently started getting this error: error: unknown warning option '-Wno-unused-but-set-variable'; did you mean '-Wno-unused-const-variable'? [-Werror,-Wunknown-warning-option] when compiling my ...
user avatar
  • 1
0 votes
0 answers
42 views

`sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder` does not clear dns cache

I need to clear DNS cache on macos Big Sur as one of the servers in local network changed IP address. When I ping that server by name it shows old IP. sudo dscacheutil -flushcache; sudo killall -HUP ...
user avatar
  • 1

1
2 3 4 5
52