Questions tagged [darwin]
Darwin is the name of the UNIX layer underlying macOS and iOS. It contains elements from FreeBSD, NetBSD and if you install the optional Developer Tools, GNU user-land tools.
39
questions
1
vote
3
answers
147
views
Detect leaf directories in Perl
For a Perl script I'm working on, I'm looking for a fast and reliable way to find all subdirectories (transitively) of a given directory which are leaves, i.e. those not having any subdirectories of ...
0
votes
2
answers
151
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/...
1
vote
1
answer
104
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 ...
0
votes
0
answers
880
views
cp fails with 'Resource busy'
I store RAW images (DNG) and my Apple Photos library on an external SSD (Rarely used, 1 year old).
Some files (approx. 2-5%) are corrupted. I face the following behavior:
Copy via Finder: Error 'File ...
4
votes
3
answers
1k
views
How do you rewind a file descriptor in bash without using a second file descriptor to read from the beginning in bash for Mac?
Environment: GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin20)
Try 0:
exec 3<> "$(mktemp)" # open file descriptor 3 to a temp file for read/write
echo 'foo' >&3 ...
0
votes
0
answers
107
views
Is there a darwin (arm64) equivalent of `O_PATH` for open?
I want to get the file descriptor without opening the file which can be attained by using the O_PATH flag on linux. (ref)
This flag doesn't seem to be there on darwin.
Context
I'm trying to use open ...
0
votes
1
answer
33
views
Is there any convention for where one stores installed software?
I'm installing some software by cloning a git repo onto my local machine. I plan on creating a soft link to the binary made from the source in the repo to /usr/local/bin. Where should I put the git ...
3
votes
1
answer
245
views
"locate" returns relative instead of absolute paths
One advised me to post here since this would be more appropriate (I am going to remove the previous one).
On my MacBook, I have the following entry in root's crontab:
0 */4 * * * cd /private/var/root &...
2
votes
1
answer
326
views
Is there a way to detect a process called exec?
I'm interested in programmatically monitoring the state of a process (that isn't my own, and isn't a child of my own process). Is there a counter that increments, or an identifier that changes, etc. ...
3
votes
1
answer
283
views
What do I need to do to update my commands?
My man page for 'whatis' does not match others I have found online. Namely, no options are available to use with it.
/home/User$ whatis -d ls
whatis: -d: unknown option
uname -srv
Darwin 16.7.0 Darwin ...
-1
votes
1
answer
66
views
least astonishment transgressed by `nl` on Darwin
Transgression of least astonishment:
bash-5.0$ (for i in {1..1000010}; do echo $i; done) | nl | tail -24
999987 999987
999988 999988
999989 999989
999990 999990
999991 999991
999992 999992
...
0
votes
1
answer
455
views
What should be at /usr/local/bin on a new OSX
I want to remove all programs which I don't need from /usr/local/bin.
What are the list of programs (folders / files), which should be on a new OSX.
Currently, I have the following list:
2to3 ...
2
votes
0
answers
157
views
No free space on system & locked out of recovery mode because firmware password, Linux to rescue? [closed]
This is a bit of a tragedy of circumstances.
I was deleting all free space on my latest install of OS X with
diskutil secureErase freespace 4 "/Volumes/Macintosh HD"
and unfortunately it failed. ...
0
votes
2
answers
340
views
mv raised error message but file was moved
I confess I am not an expert on unix commands but I moved a file to another directory and got an error message - yet the file was moved. Why is this message 'mv: rename to to /Users/billtubbs/Library/...
0
votes
1
answer
513
views
Compression size is bigger than actual directory size
I am on trying to archive a directory (a Time Machine backup) using:
tar -czf /Volumes/My\ Drive/archive.tar.gz my_directory
The archive process is going on at the moment. I am monitoring the ...