Questions tagged [macos]
macOS (previously "Mac OS X" and "OS X") is the Unix developed and distributed by Apple Inc. since 2001.
870
questions
2
votes
0
answers
44
views
diff -s command says text files are identical when they are not, in zsh on macOS [duplicate]
I've observed unexpected behavior (that seems to be a bug) in diff in recent versions of zsh on macOS, the problem is specifically with the -s directive. diff -s lists difference, but it always adds ...
0
votes
0
answers
15
views
Any options to prevent a rename command to move files from subdirectories to the parent directory after renaming?
I have following subdirectories in the parent directory ./
find . -type d|sort
.
./M1_DMSO_120h
./M1_DMSO_24h
./M1_GW4869_120h
./M1_GW4869_24h
./M2_DMSO_120h
./M2_DMSO_24h
./M2_GW4869_120h
./...
0
votes
1
answer
35
views
Display the results in an alphabetical order, independently of their case
I am using ls on MacOS 11.6.1. In the output, the Upper cases are displayed before the lower case. For example, I get the following output:
$ ls
Blabla.txt
GAGAS.txt
asdf.txt
blabla.txt
and would ...
0
votes
0
answers
21
views
2019 Macbook Air - Ubuntu Wifi Drivers not working
I recently installed Ubuntu 22.04 and have the keyboard/trackpad working. However the wireless card is not showing up in the settings. I've tried installing the firmware-b43-installer with no success. ...
1
vote
1
answer
58
views
What's the difference between Ubuntu's man and macOS's man?
My main machine is running macOS 14 Sonoma, but I often ssh into Ubuntu servers. Recently I noticed a strange difference between the man program on these platforms.
On Ubuntu, man displays a useful &...
0
votes
0
answers
18
views
macos catalina version 10.15 - Kali linux installation
I'm trying to download Kali Linux Live Boot on my macOS since I don't have the space with Virtualbox. My system does not have sufficient space to install successfully. Is there a way to do so with ...
-1
votes
0
answers
24
views
Question About Program Speed On Different Processor Architectures [closed]
I'm currently working on an assignment for a C programming course and was testing on a second machine when I noticed some interesting results.
I am reading 6, 16, 25, and 1000 randomly generated ...
4
votes
2
answers
153
views
Why is ls sorting Chinese filenames by length?
I've run into a bit of a weird behaviour that I don't fully understand with ls and Chinese filenames. I'm running macOS 13.6.1 with SIP enabled (no core OS modifications), MacPorts installed, and US ...
0
votes
0
answers
18
views
Can't start gpg-agent for .gnupg folder stored inside a Veracrypt encrypted container
I have my .gnupg directory inside a USB drive encrypted with Veracrypt. Listing the public keys with the gpg --homedir <path-to-usb-gnupg-dir> --list-keys works properly, but problems arise when ...
-4
votes
2
answers
78
views
how to to execute a command output as an argument without saving it using $()?
This is actually for brew search
but to simplify, let's say I do:
echo -e 'somedir\n\otherdir'
somedir
otherdir
Can I use otherdir as an argument without doing this?
ls $(echo -e 'somedir\n\otherdir ...
-1
votes
1
answer
52
views
The Command tput sgr0 Changes my Terminal Font and Text Colour, how to Stop This? Any echo After tput sgr0 Outputs as Bold White
When I do tput sgr0 it changes my terminal font and colour to white (should be black) and looks blocky.
Please see screenshot:
How do I stop this?
To be more concise, any echo after tput sgr 0 seems ...
0
votes
0
answers
44
views
macOS Terminal: How do I edit an MP3 file's metadata after renaming?
I have a script using variables already renaming files to the following format:
(track#) - (title) - (artist) - (date).mp3
#! /bin/zsh -
set -o extendedglob
pattern='(#b)*_ \((<0-999>)\)(* )—( *...
0
votes
1
answer
64
views
Rename file in Mac OS Terminal using Regex or translate from Windows Script
I would like help with a shell script for macOS to rename files with a certain pattern. The script would handle only one file, not multiple.
Here are three examples:
a. Public Talks_ (189) Walking ...
1
vote
2
answers
72
views
SSH Config Host Autocomplete Command not Autocompleting
I wrote a function to get my hosts from ssh config without getting wildcard hosts:
sshConfAutoComplete() {
cat ~/.ssh/config | \
grep 'host ' | \
sed '
s#.*\*##g;
s#host ##g
...
0
votes
1
answer
33
views
OSX13; how to mv series of x numbers of file chunks simultaneously to the series of directories
I have a following list of files;
260704 96 -rw-r--r-- 1 MacStudio staff 47131 Jul 28 20:18 ./GSM7673474_30_CC0022.barcodes.tsv.gz
260705 6264 -rw-r--r-- 1 MacStudio ...
0
votes
2
answers
68
views
Add a process to an already executing process? Like && or so
This question inspired me to another related question. Imagine that you start
% nohup a.sh &
and then want b.sh to execute when a.sh is finished (E.g., b.sh will process the output from a.sh. ...
0
votes
1
answer
26
views
Choosing a location for installation of Docker Desktop app’s CLI tools
When completing the installation of Docker Desktop 4.25, the Advanced Settings offers a choice:
Choose how to configure the installation of Docker's CLI tools:
System (requires password) Docker CLI ...
0
votes
0
answers
46
views
The docker image on Mac OS requires access to /mnt
I'm trying to start a container and docker throws an error
docker: Error response from daemon: Mounts denied: The path /mnt is
not shared from the host and is not known to Docker. You can configure
...
0
votes
0
answers
43
views
Are FreeBSD binaries compatible with macOS?
Since FreeBSD and macOS (OS X) are very similar to each other, can programs written for FreeBSD run on macOS? And if a program can't, then would it be possible to make it work?
0
votes
2
answers
92
views
I have to run eval $(/opt/homebrew/bin/brew shellenv) every time I start my pc for the terminal to recognise it
I use the Fish shell on OSX and installed brew.
Now I notice everytime I start my mac I need to run the eval $(/opt/homebrew/bin/brew shellenv) command again to make it recognice brew.
I also noticed ...
4
votes
0
answers
181
views
Bash: Stderr being sent to a file (when it shouldn't be!)
The following code is on macOS as part of /etc/bashrc_Apple_Terminal, in order to save and restore the shell state across all open windows and tabs (note that this is therefore the very old bash 3.2....
0
votes
0
answers
26
views
Is there an analogue of the macOS program security for the Debian?
As an macOS user, I can use a security to store symmetric keys. I can add such a key to a chain and if I don’t specify which chain, the default chain will be used:
security add-generic-password -s &...
0
votes
1
answer
32
views
Can't install GDK on Catalina
Welcome, while trying to install Gitlab GDK on a MacBook Pro Catalina 16G RAM it goes ok except three dependencies which already exist but the GDK says they are not installed or outdated!
bin/gdk ...
0
votes
1
answer
341
views
Mac mini can't mount NFS shares anymore
It's impossible to mount NFS shares anymore on a Mac mini M1. It was working fine last week. There have been no changes in the network at this point.
Couple of months ago I followed this guide to ...
0
votes
0
answers
65
views
What does it mean that "virtualbox" would like to receive keystrokes from any application? Is this safe or malicious
I'm using a MacBook and I'm installing my first virtual machine using virtualboxmanager I received from a google IT Support Specialist course. I'm currently learning about the command line linux bash ...
0
votes
0
answers
31
views
"bogon" instead of "hostname" in MacOS File Sharing
As the above picture shows, when I turned on "File Sharing", MacOS tells me to access it by "smb://bogon", however, I think the correct item here should be "smb://<hostname&...
2
votes
0
answers
96
views
vt100 terminal escape code issue
When I ssh into any arista switch from my mac I get a mysterious n added to the prompt immediately on login. After asking my coworkers about it I found out that it's about 50/50 where some also see ...
2
votes
1
answer
78
views
Creating a filename for an opened file descriptor
I have a file on the filesystem. I'm opening the file with the open(2) function to get the file descriptor to that file.
Now I remove the file. But I still have the file descriptor, so I can read and ...
0
votes
1
answer
44
views
Stream single application from macOS to Linux using X11 forwarding or similar
I want to stream an application (preferably with the menu bar on top) from macOS to Linux. You can do this in the other direction, from Linux to macOS, via XQuartz and X11 forwarding.
I have seen ...
0
votes
0
answers
33
views
Cannot copy text from tmux integrated terminal in update 1.82.2
I solved this issue of copying text from tmux window inside Visual Studio Code's integrated terminal by holding Option key but with the latest upgrade to 1.82.2 I am not able to copy the text from ...
0
votes
0
answers
27
views
OpenMPI built from source not working on a raspberry pi + mac cluster
I am trying to use macbook m1 as the master in a cluster of 4 raspberry pies (workers, connected to each other with a switch which is connected to my home router to which the mac is connected via wifi)...
0
votes
0
answers
37
views
Using Terminal with a serial connection
Hello I am using terminal to output my serial connection device. I was wondering how can I get rid of the spaces when it starts a new line. On Windows I would use Putty and turn on Implicit CR in ...
0
votes
0
answers
51
views
Can't restart a suspended process
I execute a long running Python-process. To stop the annoying noise from the fans I use AppPolice to prevent this process from using more than 20 % CPU (I don't care when it finishes).
I think that ...
0
votes
0
answers
25
views
lsof doesnt seem to be showing all connections
I am on the latest MacOS
nettop shows connections from browsers and other processes.
However lsof -n -itcp doesnt show any connections. Is there a way to debug this?
0
votes
2
answers
46
views
Replace last nonblank line with a command output
I have a .env file like
PARAM1=val
PARAM2=val
I want to replace the last noblank line with another file content
So far I have something like below:
{ (sed -e :a -e '/^\n*$/{$d;N;ba' -e '}' local.env |...
0
votes
0
answers
13
views
bloque system settings on macos Ventura
help I need to block system settings in macos ventura, but I can't find a way to do it, they had told me about creating a script in python, but I haven't been able to do it
0
votes
0
answers
34
views
How do I debug code from dylib in lldb
I have a sketch of code in rust that uses dynamically linked ffmpeg library.
How do I actually see the code of ffmpeg inside lldb.
I've modified portfile of ffmpeg6 by adding this lines.
configure....
1
vote
2
answers
38
views
Write catalogue file names in to a file with additional string at the beginning end of a specific name
In specific directory
using ls | tee -a file.txt
gives me a list from this directory.
Example:
file1.txt file2.txt file3.txt
How to add specific strings inside ls command into final output simply ...
0
votes
0
answers
23
views
How do I get the number of hardlinks of a folder?
I am on Mac. However, I use gstat (GNU stat) so my understanding is that behavior should match linux.
I cd to a folder. Then I use gstat --format=%h .. The output is 65.
Next, I use gfind . -maxdepth ...
0
votes
1
answer
55
views
bash get output from command
I try to make a script for macOS that informs me about available software updates:
result=$(softwareupdate -l)
if [[ $(echo $result) = *"No new software available."* ]]; then say yes;fi
But ...
6
votes
1
answer
2k
views
Why does `ls` in Linux and macOS show different owners (uid) for the same file?
I copied some files to HFS+, using macOS, ensuring that it was copied exactly. On macOS these copied files have 501 as owner according to ls -han.
I then plug in the HFS+ usb stick into Ubuntu, and ...
1
vote
1
answer
32
views
Changing default editor for markdown bash_profile
I am pretty new to bash/zsh on Mac OX. I am trying to change my .bash_profile so that that all markdowns are opened with sublime when I enter open [filename].md in terminal. I have created synthetic ...
0
votes
0
answers
21
views
VMWare Fusion Linux Ubuntu not recognizing mac OS, asking to erase disk
Im trying to install Ubuntu on my virtual machine, VMWare Fusion. I'm running version 12.2.5, and I downloaded the .iso file for ubuntu for version 23.4 here: https://ubuntu.com/download/desktop
I ...
0
votes
1
answer
75
views
Double zsh prompt is showing unformatted then formatted
Any command I run (aside from clear) results in a double zsh prompt -- the first one showing the unformatted prompt, the second one showing the correct, formatted prompt.
My ~/.zshrc file:
if [[ -r &...
1
vote
1
answer
38
views
Convert directory with opus files to CSV or similar?
I have a folder with opus sound files. I would like to convert that folder listing to something I can use in a spreadsheet. I want the result to contain something like file name, length of the sound ...
1
vote
0
answers
55
views
echo or >> (or something) fails when network connection has been idle for a long period?
I have a script that takes several hours to finish (the script runs whisper and it is the whisper . At the end I echo and >> some results to a network volume mounted using SMB. This often fails ...
0
votes
1
answer
32
views
Add basic console apps such as `zsh` or `nano` to the base Linux provided by Docker Desktop app
I recently installed Docker Desktop app version 4.22.0 on macOS Ventura on a Mac with Apple Silicon (ARM, not Intel). I successfully pulled and ran a couple of containers: one for MySQL database ...
0
votes
1
answer
73
views
Issue setting up dual-boot Mac OS and Zorin OS on 2017 MacBook Air
I recently purchase a 2017 MacBook Air that came with a fresh install of Mac OS on it. Following a couple online guides, I was able to shrink the original partition of the HDD, and then re-partition ...
0
votes
0
answers
85
views
Shell script: check for file doesn't work if there is a symlinked directory involved?
If I have
/mydir/myfile.txt
this code echos file already exists
if [ ! -f "/mydir/myfile.txt" ]; then
touch "/mydir/myfile.txt"
echo "created file"
else
echo ...
2
votes
0
answers
48
views
Dyalog (APL) +RIDE issue
I am currently running a vanilla Arch machine and I wanted to try out APL. Dyalog only provides deb and rpm packages, but I saw a dyalog-bin pkgbuild in the AUR, and it seems to be pulling from the ...