Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [osx]

The command line and other Unix-like aspects of Apple's macOS (Mac OS X)

1
vote
0answers
11 views

Using unison to sync between MacOS and debian-linux

I am doing a project with EV3 (Lego Mindstorms). Currently my workflow requires saving the file, transferring it, compiling it and finally run it. This takes too much time and I wanted to improve it....
1
vote
1answer
20 views

Unable to edit auto_master under macOS Mojave [on hold]

I'm running macOS since several years and I have an auto_master file that contains my mounts config. On a new Macbook, I cannot edit this file which is in the /etc folder and I have the following ...
0
votes
0answers
7 views

Powerline error “no such file or directory: /Users/myusername/Library/Python/2.7/lib/python/site-packages/scripts/powerline-config”

Tried to install powerline, now every time i relaunch terminal this error messager appears: no such file or directory: /Users/myusername/Library/Python/2.7/lib/python/site-packages/scripts/powerline-...
2
votes
1answer
53 views

Cleanup Script for macOS

I have a bunch of shared Mac workstations with dozens of users. These users constantly leave large files on their desktop and in the trash, which eventually fills up the local hard drive. I want to ...
0
votes
0answers
6 views

How to debug a font binary from the Terminal on Mac

I have created a demo font which I haven't been able to get working yet, running into this Browser error when I try to load it in the browser: OTS parsing error: incorrect entrySelector for table ...
0
votes
2answers
33 views

Why does zsh list my prompt incorrectly on OS X?

I'm trying to figure out why zsh's prompt looks like this: (in text form): \[\]\u\[\] at \[\]\h\[\] in \[\]\w\[\]$(__git_ps1) \[\]$(git_diff)\n\[\]($(date +'1:MikesMBP.local ')) \[\]$\[\] I'd like ...
0
votes
0answers
20 views

mount: realpath <PATH>: no such file or directory

I'm attempting to mount a NAS drive locally, but am having trouble: mount -t smbfs //user:password@nas/path ./tmp Produces mount: realpath /Users/user/tmp: No such file or directory For context, ...
0
votes
0answers
10 views

MacOS brightness controls not working [migrated]

I've encountered a problem when upgrading my late 2013 MacBook from OS X 10.9 Mavericks to macOS 10.13 High Sierra (now running Mojave): brightness controls appear to not affect anything (only the pop-...
0
votes
0answers
8 views

Can we configure audit pipe to record a specific kernel audit event in osx

Hi I wanted to configure the auditpipe available in MacOS to record specific audit events only. Like I want it to record only AUE_POSIX_SPAWN events. Rest of the events from audit class ps must not ...
0
votes
0answers
14 views

If it's possible to programmatically reset Mac to factory defaults

Wondering if there is a way to programmatically do something close to this process. The main steps are: Backup computer. This can be done with standard stuff I imagine. Deauthorize accounts. This ...
0
votes
1answer
24 views

pstree using VT100 graphic chars [duplicate]

I am running pstree on MacOS Majave and wan to Show branches of processes using VT100 graphic chars: $ pstree -g 2 | head -n 3 ─┬◆ 00001 root /sbin/launchd ├──◆ 00049 root /usr/sbin/syslogd ├──◆ ...
0
votes
3answers
269 views

Bash script with limited path

I'm trying to write my first bash script to essentially install a bunch of dependencies and then execute a script. I'm struggling debugging this with the user b/c I'm a dev which means I already have ...
-1
votes
1answer
64 views

Can browse to an app at localhost.company.com but that isn't in /etc/hosts; where else could the redirection be?

✗ cat /etc/hosts ## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 127.0.0.1 localhost 255.255.255.255 ...
1
vote
0answers
74 views

Higher privilege level than root on macOS [closed]

MY version of the macOS is 10.13.6 What I want to do is get a privilege that is higher than the root privilege. The reason I want this is because I would like to create a completely undeletable file/...
0
votes
2answers
36 views

Syntax error near unexpected token 'which'

I'm trying to script something in OS X Automator and i ultimately want to send the output of which npm to <npm> install and i'm getting the error Syntax error near unexpected token 'which' Any ...
0
votes
0answers
20 views

nano: how to search text with tab

How can I search text with nano and in OSX that contains a tab? I use ctr+w do start the search and then type the text I want. I tried "\t" but it doesn't work.
0
votes
1answer
33 views

Remove bold fonts from zsh

I just started using zsh and oh-my-zsh in the default macOS terminal. When using $ ls (or related commands like la or ll) names of directories are displayed in bold font. Is there a possibility to ...
-1
votes
1answer
19 views

bash -vx and turn off the 'prompt_git'

I tried command bash -vx which is stated that (By the way, these two options are particularly useful when you are testing or debugging a shell script.) $ bash -vx ++ prompt_git ' on ' bash: ...
0
votes
0answers
19 views

How to read the file in remote server using local software?

Currently I am using MacOs, I've connect to a remote file server, and I have Matlab installed in my local MacOs. Can I use my local Matlab to open a file in the remote file server? Previously when I ...
0
votes
1answer
71 views

terminal flashing causing sd card to be unreadable

I am currently trying to flash my SD card, but keeps getting this error that the sd cards unreadable, I tried using etcher and dd, and it keeps doing it? I am trying to flash https://www.home-...
1
vote
1answer
45 views

tar --list only top level files and folders

using tar --list --file=x will list all files and folders. I am just looking to list the top level files and folders does anyone know how to do that? alternatively, does anyone know how to list only ...
2
votes
1answer
44 views

fswatch: update file permissions on creation

I have a directory and I want when a new file or directory is created inside to update their permissions. For now, I achieved to do it with fswatch and new file/directory creation is detected, ...
1
vote
3answers
33 views

Mapping a range of IP's to a domain name in hosts file

I work with Wi-Fi. Due to that my system's IP changes every time I connect to the network. For my work, I need to map my IP to a specific domain name. So, every day I need to make changes in my hosts ...
0
votes
1answer
12 views

How to remote view OSX machine from Fedora with TigerVNC

I understand the I can use VNC protocol for remote viewing. There is a mac on my network which has VNC enabled. I have downloaded TigerVNC dnf install tigervnc I get the IP address of host I want ...
1
vote
0answers
52 views

How can I use a mac to scroll and copy-paste text on the tmux via ssh?

I always use macos Terminal.app to control my ubuntu servers via ssh, and I need to use tmux to keep my program running in background. Now, I know how to configure the tmux (on my ubuntu servers) to ...
0
votes
0answers
30 views

How to sniff a socket without using socat?

I would like to do socket sniffing, but I'm wondering what options there to do without using socat? I can't use that command, since it's not already installed (and I cannot install it). I thought ...
-1
votes
0answers
14 views

Can't connect with Finder to FTPS

I'm trying to connect my MacBook Air to my FTPS server on my raspberry. I can connect to my server with fileZilla from anywhere, but when I tried to connect with the Finder, or it shows me an error ...
-1
votes
0answers
26 views

Is there a way to set coloring for “cd tab” complete on macOS?

I have turned on coloring, set colored-stats on in my ~/.inputrc but still not working, here is a screenshot, first one, cd tab & second is ls tab
0
votes
1answer
23 views

SSHFS symbolic link does not show up

So this issue is actually occurring between OSX and CentOS. I created an ssh mount using osxfuse: sshfs [ssh config name]:/remote/location/dir.ec.tory ~/client/location/dir.ec.tory -o ...
1
vote
2answers
48 views

search through all *.py files [duplicate]

I am using Mac OS terminal (similar to Linux) and trying to find best way to search inside all files on a computer that has extension *.py What is the best way to achieve this? I wanted to put 1 ...
0
votes
1answer
20 views

OSX get user, system CPU usage per process

I am familiar with pidstat command that gives separate user and system CPU per process on Linux. What is the equivalent on OSX? Top gives these values but only on machine level. Load Avg: 3.26, 3.02,...
1
vote
1answer
32 views

Creating a directory in Samba share from OSX client always has ACL “mask:r-x”

I've had a few shares configured in Samba 4.9.3 (Arch Linux), everything was fine. Access control was done via unix accounts and groups. Then I decided to change the running system. I set up a Time ...
0
votes
1answer
65 views

Conditional emoji on terminal success and failure

I am using a Mac and I want to be able to show emoji X for every successful command that I type in and emoji Y for every command that results in failure.
0
votes
1answer
27 views

What is the IP address of my local interface that is required by IP_ADD_MEMBERSHIP?

In this man page http://man7.org/linux/man-pages/man7/ip.7.html, it is written that IP_ADD_MEMBERSHIP can be used to join a multicast group. We need to provide, as input, in particular, the IP ...
0
votes
1answer
12 views

MacOS parsing for ASN

I use MaxMind API to get IP Address data. What I am looking for is the country and the ASN. The MaxMind API works as follow: curl -s http://geoip.maxmind.com/e\?l\={APIKEY}\&i\={IP} And returns ...
2
votes
0answers
43 views

autocomplete with inline variable setting

I use bash version 4.4.19(1)-release (x86_64-apple-darwin17.3.0) on my Mac with MacOS (10.13.6) For example, I have autocomplete set up for the AWS CLI, via complete -C '/Users/jstoner/Library/...
0
votes
2answers
48 views

Problem with permissions when trying to sync two external hard drives with rsync

I'm trying to sync an external hardrive with the one containing my photo archive. I wanted to begin with the basics, so I run: rsync -aHm --delete /Volumes/archivo_1a/ /Volumes/archivo_1c/ In the ...
0
votes
3answers
119 views

Threats found in /dev/fd

While trying to make sure I have no threats on my iMac I used Bitdefender to perform a full scan and I found this Output of running ls -la in /dev/fd: ls -la total 11 dr-xr-xr-x 1 root ...
1
vote
1answer
84 views

ssh_config Host * overrides earlier host

Im trying to make my .ssh/config support different ssh keys for the same host so that I can commit to bitbucket as either my personal or work user, and other ssh stuff still uses my work user. My ...
0
votes
1answer
45 views

How do I get rid of human readable format for ls?

My ls -l command automatically prints file sizes as human readable. I have tried exporting BLOCKSIZE in my bash profile in various formats to change this but literally everything I have tried on the ...
14
votes
3answers
2k views

How do I create a UDP packet?

When I perform the following Netcat command and view the packets with Wireshark, it says the UDP packet is malformed. $ echo "this is a test" | nc -u 127.0.0.1 53 Similarly, using commands like $ ...
1
vote
0answers
35 views

Access firmware from terminal? [closed]

I have a 2008 MacBook I bought new and have used up until a few months ago with leopard and snow leopard install disks. After many strange occurrences I decided to erase and reinstall my OS. After ...
1
vote
1answer
33 views

read command with ??? input

Why when reading input with read, and the input is ??? the result is bin src? $ read ??? $ echo $REPLY bin src Running bash on macOS.
1
vote
1answer
58 views

tar: compress text stdin and stdout [duplicate]

Using tar, is it possible to compress stdin text and have the compressed data appear in stdout? Example: $ echo "test" | tar c - <compressed blob here> I'm using macOS Mojave.
0
votes
1answer
50 views

Resolve relative path without resolving symbolic links in bash

I'm looking for a portable way to resolve relative paths into absolute paths while not resolving any symbolic links. For example, run the following file /home/nat/cat/bat/hat.sh in bash: set -x pwd #...
4
votes
1answer
283 views

Cannot change the environment variable

WHAT I AM USING zsh MacOS Mojave 14.10 WHAT I WANT TO DO $ echo $USERNAME myusername $ export USERNAME=newvalue $ echo $USERNAME newvalue WHAT IS HAPPENING $ echo $USERNAME myusername $ export ...
1
vote
3answers
47 views

Quickly kill processes containing word

$ ps aux | grep ruby user 1565 3.7 0.1 4307464 17696 s000 S+ 7:31AM 0:00.61 /Users/user/.rbenv/versions/2.3.1/bin/ruby bin/rails c user 1579 0.0 0.0 4268020 ...
1
vote
1answer
58 views

grep: Always show context of N lines

Given a file like asdasd 123 X 456 X 789 asd asd asd asd If I run grep: grep -C3 'X' on the above, I get the following results asdasd 123 X 456 -- 456 X 789 asd asd It appears that grep only ...
0
votes
1answer
52 views

macOS pf asymmetric routing through VLANs

I have a VLAN interface vlan0 that has a tag of 444 that has an IP of 172.16.16.16 The VLAN goes through the physical en0 interface. I have another interface mine0 that's local just to the computer....
2
votes
2answers
63 views

Netcat: UDP connections don't terminate?

A simple example, here's my server/host: nc -ul 192.168.0.2 54 And the client: echo "test" | nc -u 192.168.0.2 54 The server will intercept the "test" message, but nc doesn't close. It just ...