Questions tagged [macos]
macOS (previously "Mac OS X" and "OS X") is the Unix developed and distributed by Apple Inc. since 2001.
900
questions
0
votes
0
answers
29
views
Where/How does socat insert packet boundaries?
I am using socat to forward incoming serial traffic to a local UDP port (on macOS):
socat OPEN:/dev/cu.usbmodem13203 UDP:localhost:12345
I consider a serial device being a streaming interface while ...
1
vote
1
answer
28
views
Unable to read more than 1024 chars on ZSH + MacOS
Trying to read a long input into a variable from ZSH on MacOS.
echo "URL: "
read URL
input is always truncated to 1024 chars... if I try and type additional chars nothing happens.
...
0
votes
1
answer
24
views
Delete multiple extended attributes (but not all of them) in one step
For example, I have a file with three extended attributes:
com.apple.FinderInfo
com.apple.metadata:_kMDItemUserTags
com.apple.metadata:kMDItemFinderComment
I can delete the first two using
xattr -d ...
0
votes
0
answers
32
views
ls: single-column vs. multi-column layout, non-Unicode characters in filenames
Create a directory ~/test with abcdefghijklmnopqrstuvwxyz and zyxwvutsrqponmlkjihgfedcba files in it.
ls ~/test will list them using multi-column layout:
abcdefghijklmnopqrstuvwxyz ...
1
vote
0
answers
31
views
ls -g: 'man ls' says -g option has no effect, but it works
macOS 14.3, zsh 5.9 (x86_64-apple-darwin23.0). man ls:
-g: This option has no effect. It is only available for compatibility with 4.3BSD, where it was used to display the group name in the long (-l) ...
3
votes
1
answer
94
views
cp, trailing slash, and copying to the same vs. to another directory
To copy a directory to another directory, the first directory should be written without the trailing slash:
# example 1
# this command will copy dir1 to dir2
# (dir2 is preexisting)
cp -Rip dir1 dir2/
...
0
votes
1
answer
40
views
Find all the folders that are concealed using 'chflags'
I have concealed some folders on my laptop using chflags:
chflags hidden hide-me
And I don't remember where exaclty these folders are located.
How is it possible to find all of them? (Probably by ...
0
votes
1
answer
27
views
Difference between cp and cp -rf on a Mac
Could anybody explain is there any difference between cp some-file.txt some-folder and cp -rf some-file.txt some-folder on a Mac?
I was told that cp -rf forces cp to overwrite existing files, but it ...
0
votes
0
answers
23
views
Can't clear / scroll-back buffer when using tail -f alacritty?
When I use tail with the -f option, I can not find anyway to clear the screen. It just shows a ^L. Same problem when following live logs with docker.
While I'm just in the shell, the cmd-k works fine.
...
0
votes
0
answers
45
views
Delete Network Interface MacOS Sonoma
Recently I was playing with UTM and VMware Fusion on my Mac to try to create some virtual machines on an apple new processors, I have a Macbook Air M2, and I uninstalled UTM and Fusion from my Mac ...
0
votes
1
answer
145
views
i am getting error : fatal error: 'openssl/sha.h' file not found while installing mongodb in mac m1 for the laravel project
nssl.c:24:10: fatal error: 'openssl/sha.h' file not found
#include <openssl/sha.h>
^~~~~~~~~~~~~~~
1 error generated.
make: *** [src/libmongoc/src/libmongoc/src/mongoc/mongoc-crypto-...
1
vote
6
answers
140
views
GREP matching 6-7 digits within other data
I am trying to create a Regular Expression that will match a string of digits that is 6 or 7 digits long.
[0-9]{6,7} This works but i dont want a match in strings that are longer than 7 digits.
Please ...
0
votes
1
answer
52
views
How do I create a global 'Hotkey' window for Alacritty?
I've been migrating from iTerm2 to Alacritty, and the feature I miss most is the global hotkey window. I've attempted to replicate this behavior using AppleScript, but to no avail. What's the best ...
0
votes
0
answers
34
views
ssh-agent doesn't accept passphrase on first load
When there is no ssh-agent process running, when I open my terminal, the ssh-agent is started and it asks me for my passphrase for my private key. Every time I try to enter it, I get an error: Bad ...
0
votes
0
answers
49
views
rsnapshot backup fails with cryptomator mounted volume
I have rsnapshot (on macos) setup for my backups and in the config file one of the locations I am trying to back up is a Volume mounted by Cryptomator. Relevant line in config file:
backup /Users/...
0
votes
1
answer
28
views
Use libfido2 on macos to set PIN on usb security token
I have bought a FIDO-U2F/FIDO2 usb security token and managed to add it as passkey for github on my macOS (sonoma).
It didn't work for another site and I suspect that it's because the key doesn't have ...
1
vote
1
answer
58
views
Get /dev entry for USB on a Mac
I have never used a Mac before and have no idea what I'm doing. I need to run dd on a USB device to copy data off. I plug the device in, and it shows up in system_profiler SPUSBDataType. How do I ...
2
votes
2
answers
457
views
I used to not need "-i" when using base64
I am using macOs 13.6.1 (22G313) for a machine.
I used to be able to base64 a .p12 file (maybe 1 - 3 years ago) using the following format from the terminal:
base64 mastercard-track.p12 > ...
1
vote
1
answer
29
views
PF Firewall: Restrict Access to Other Ports Only for Clients with Active SSH Connections
I previously worked with a large organization that employed BSD for secure control over public access to their internal network. The approach involved users establishing authenticated SSH connections ...
0
votes
4
answers
106
views
how to subtract a date in format: 'xyz/[int][int]/[int][int][int][int]' from the current date?
Scenario
I have containers which have last deploy dates in the format:
month/date/year or feb/11/2024.
I cant change the way they output the last deploy date.
I'd like to subtract the last deploy date,...
0
votes
1
answer
305
views
GPG hangs on MacOS
When trying to access secret keys, my GPG hangs. The existing solutions suggested killing gpg-agent, but that didn't help for me. I tried debug logging (see below), but couldn't make anything out of ...
0
votes
0
answers
34
views
QEMU stuck cursor
I am running a MacOS machine on QEMU, and the cursor has remained stuck, and won't respond at all. Also there are two arrows (my Windows cursor and the QEMU cursor). My Windows cursor moves freely, ...
0
votes
0
answers
46
views
Linux On intel Macbook pro
I am facing problems booting any linux distro an my intel mac. i think it is not a hardware problem because i have the full specs macbook pro.
i tried many linux distro, (ubuntu, debian, manjaro, kali....
0
votes
1
answer
35
views
How can I find out what so_type an existing unix socket has in macOS?
In linux we can run ss -x or lsof -U +E and we can see what type unix socket has. But in macOS there is no ss or we can run lsof -U which only shows TYPE - unix, but I would like to know with some ...
2
votes
3
answers
141
views
Extracting strings from (BASIC) file
I am trying to extract all of the strings (in the order in which they appear), from a BASIC listing for Taipan. However, I also want the delimiting " (at the start and end of the strings) to also ...
0
votes
1
answer
100
views
sed/gsed "invalid command code . ", "expression #1, char 1: unknown command: `.' "
I get these similar errors in both OS X sed and gsed, in a command file that does not contain a period in expression 1, character 1. The only place a '.' appears in the file is on line 5, where it is ...
0
votes
0
answers
10
views
vagrant server instance closed automatically on starting jboss domain
I am new to vagrant. I am trying to setup a test environment with jboss. So I have setup a fedora vagrant and installed jboss in it.
Post installation it worked in standalone mode and the console came ...
1
vote
1
answer
50
views
How to get user last login datetime as an ISO 8601 compliant date or timestamp?
I'm running zsh (version 5.9 x86_64-apple-darwin22.0) on macOS (Ventura 13.6.3).
I want to figure out if a given user has logged in during last X days. To accomplish this, I want to get the last login ...
0
votes
1
answer
80
views
black screen on the second monitor connected trought RDP on Fedora
My linux machine
bruno@fedora:/$ cat /etc/os-release
NAME="Fedora Linux"
VERSION="39 (Workstation Edition)"
ID=fedora
VERSION_ID=39
VERSION_CODENAME=""
PLATFORM_ID="...
1
vote
1
answer
50
views
mysqld Settings in my.cnf not Being Applied When Executing mysql
mysql is ignoring the settings under [mysqld] in my.cnf, it picks up the settings for [client] and [mysql].
How do I fix this?
I tried brew services mysql restart, but it didn't make a difference.
my....
0
votes
1
answer
41
views
Rsync doesn't handle time correctly on a mounted folder on MacOS
I have a mounted a folder from my NAS with mount -t smbfs -o -d=755,-f=755 //nas.local/backup ~/backup.
I now try to rsync a local folder to this distant folder with something like rsync --modify-...
0
votes
1
answer
355
views
How to create a bootable USB for Debian on Mac with Apple Silicon?
I thoroughly went through the official and up-to-date articles from Debian. I will list some resources below:
https://lists.debian.org/debian-cd/2023/12/threads.html
https://wiki.debian.org/...
1
vote
1
answer
264
views
How to make KDE desktop works like MacOS
I'm a Linux user for more than 20 years, but recently I need to work on Mac far more than on Linux. The less I need to work on Linux, the more I want my Linux desktop to work like mac.
I've done some ...
3
votes
0
answers
128
views
named pipe (mkfifo): how to detect on macos that the reading end (consumer) has disconnected, without the consumer writing to the write end?
Note: this is about the producer detecting the consumer disconnecting, not the consumer detecting that the producer disconnected (aka EOF). The producer might not write any data for long periods, but ...
0
votes
0
answers
45
views
Kindle ignores mutt emails
Problem Summary
kindle ignores epub attachments send to the kindle address (<x>@kindle.com) when using mutt but not with gmail. (same sender address)
System Specs
Apple Silicon MacBook Pro 2021 ...
0
votes
0
answers
46
views
How to disable root account on MacBook Pro if I don't know root password
I bought a used MacBook Pro 2017 from a reseller but I found restrictions in accessing many places. Then I realized this machine is already configured with a root user which I don't even know. How ...
0
votes
1
answer
40
views
Editing PDF files from a list, from half a page to get a whole page from that one half
I have a PDF file that looks like this
----------
||----| |
||----| |
| |
| |
| |
|________|
with the help of the following commands
$ convert -density 300 -quality 100 -crop ...
2
votes
0
answers
48
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
16
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
52
views
Display the results in an alphabetical order, independently of their case [duplicate]
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
104
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
75
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
57
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 ...
4
votes
2
answers
172
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
126
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
89
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
81
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
120
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
205
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
108
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
...