Skip to main content

All Questions

Tagged with
0 votes
0 answers
158 views

MacOs equivalent of adding a user to the linux dialout group on for permissions setup for UART communication

I'm working on a project where I'm interfacing with some hardware and want to monitor the data from some sensors using a specific tool. The tool doesn't have official support for MacOS but I've ...
sobbingDev's user avatar
0 votes
0 answers
28 views

switching window keyboard shortcut with screen window management on MacOS

all I used to be a linux user, now I am accessing a server from MacOS, Ventura. I have remapped my Mac Keyboard by switching the ctrol and command keys. However, I came across some problems with the ...
FewKey's user avatar
  • 101
2 votes
1 answer
1k views

Command Line decryption of aes-256-gcm no-longer working after OpenSSL updated

Late last year (2022) I encrypted a file using OpenSSL using terminal on my Mac with a very simple openssl enc command and was able to decrypt using this command: openssl enc -d -aes-256-gcm -in ...
bakslaash's user avatar
0 votes
1 answer
45 views

running a multi-threaded script on a macPro to a smb-mount folder throws an error

We're trying to run a multi-threaded script from our macPro but we keep getting an error massage. The xml script contains parameters to run a specific tool, the paths to the raw data and other ...
Assa Yeroslaviz's user avatar
2 votes
0 answers
118 views

How to source from stdout for both Linux and macOS?

On Linux I can do: source <(cat .env | grep ANDROID_GRADLE_TASK) But on macOS, this doesn't do anything (no error, and no source) What can I use for macOS? Is there a command that works both on ...
Dimitri Kopriwa's user avatar
0 votes
1 answer
712 views

"echo $VAR | base64 -di > file" fail to execute on MacOS

On Linux I can do: echo ${ANDROID_KEYSTORE} | base64 -di > android/keystores/staging.keystore But on MacOS, the same commands gives: base64: option requires an argument -- i Usage: base64 [-hvDd] ...
Dimitri Kopriwa's user avatar
0 votes
1 answer
597 views

Open unity application via command line wih application's graphics off

On Unity documentation we can see there is a way to run a standalone player via command line without the graphics by typing -nographics I'm using the following command on a mac terminal, but it is ...
Jas's user avatar
  • 101
0 votes
0 answers
100 views

Unable to redirect `coproc` streams using FD 5 and 6, but not 3 and 4. Why?

On OSX, while attempting to expose a service implemented as a bash script, and started with coproc, to a client implemented as a bash script, by passing the IO streams of the service to the client, I ...
Christopher King's user avatar
0 votes
1 answer
2k views

What does this rm -r command do in following usecase on mac terminal?

First I'm directing to the destination folder by below command cd /Users/myname/MyFolder/ Now I'm using below command here, what does this command will do? rm -r ../build ../dist rm command is for ...
Devender Kumar's user avatar
5 votes
1 answer
3k views

What is the “-o” argument in find command?

I am currently running this command: find . \( -type d -name .git -prune \) -o -type f -name "*"` on my macos shell. I found the command in a Stack Overflow thread for another problem. I do not ...
Gaurav Srivastava's user avatar
0 votes
1 answer
235 views

Replace files recursively

I have a deeply nested directory called MyProject which contains dozens of git repositories. Each of those repositories contains, somewhere, a directory called utils which contains a file called ...
j_d's user avatar
  • 123
0 votes
1 answer
176 views

Moving files to matching folders on linux command line

I would like to copy or move files in to matching folders. these are my filenames: 1-filename-aa.txt 2-filename-aa.txt 3-filename-aa.txt 1-filename-bb.txt 2-filename-bb.txt 3-filename-bb.txt these ...
cnknv's user avatar
  • 1
0 votes
1 answer
209 views

Anaconda stopped working when added DYLD_LIBRARY_PATH to bashrc

I am using Anaconda Navigator version 1.9.7 on macOS Mojave 10.14.5. I found that most anaconda-navigator, pip, ... commands stopped working when I added the following command to .bashrc. export ...
Kernel's user avatar
  • 101
0 votes
3 answers
4k views

how can I get the yes command to force overwrite and to do so with new lines?

I would like cp to prompt before overwriting so I am using -i. (I might sometimes use an alias for cp, or similar, so cp always occurs with -i). I may want to say overwrite all. I know that's the ...
barlop's user avatar
  • 24.3k
1 vote
1 answer
580 views

How to copy a nix-env profile using nix-copy-closure?

I am using nix-env with multiple channels and local overrides to install packages on macOS and Nixos Linux on multiple computers. Sometimes I exclude packages from updates, because of problems. All ...
jmg's user avatar
  • 111
0 votes
1 answer
58 views

cp matching files in CLI on OSX with path slightly modified

I am trying to find a command that finds and copies files with a given name to a another folder but with a slightly different path. For e.g. there are 4 copies of PNG files named ic_arrow.png app/...
Bootstrapper's user avatar
1 vote
1 answer
409 views

Matching multiple path-components with `find`

Let's say I want to find all the node_modules folders in my Code directory: find ~/Code -name 'node_modules' -type d But what if I want to find all the setup folders, that themselves are inside test ...
ELLIOTTCABLE's user avatar
  • 2,535
2 votes
1 answer
3k views

Long form command line flags in Terminal?

I hope this is the right place to ask this question. So basically, I'm currently combing through some of the more commonly used Terminal commands, and I find it really hard to remember the short form ...
Baggio Wong's user avatar
1 vote
1 answer
382 views

Output of du command

I have a folder and it is 16.91GB in size(I checked in Finder). I tried to check the size by using du command. So, I tried du -sh ~/folder and I got 16G. I thought I will get the output in Bytes ...
SkrewEverything's user avatar
17 votes
3 answers
22k views

How to force ls terminal command to show results in Bytes while I have set the default to ls -h in bash profile?

I am following the snippet here to improve my terminal command in Mac OSX. It sets the default value of ls results to human-readable by exporting alias ls='ls -GFh' to bash profile file. This is very ...
cybergeek654's user avatar
9 votes
3 answers
78k views

How to run a bash script via absolute path?

I have a file: /Users/danylo.volokh/test/test_bash_script.sh Content is very simple: #!/usr/bin/env bash echo "-- print from script" I'm in folder "danylo.volokh" This command runs fine: Danilos-...
Danylo Volokh's user avatar
0 votes
1 answer
1k views

Alias command from terminal that opens a new terminal on a specific folder

I have this command already working in my .bash_profile: alias mysite='cd /Applications/sites/mysite;pwd; php artisan serve --port=9000 | open http://localhost:9000 | open -a Finder ./' So it: CD's ...
Francisco Caviano's user avatar
1 vote
1 answer
2k views

Command line for Application alias in Mac OS X

I’m working on an installer for a project and I’ve written a post-install script that runs the executable for my project after it’s done. I want to know the command line argument—or if there is a way—...
cb92's user avatar
  • 11
8 votes
3 answers
571 views

How to have a better view when typing out directories in terminal?

I am currently using a Mac and learning to use the terminal, but the question applies to Linux systems as well. I would like to ask, when typing out paths in the terminal/command line, is there a way ...
user1367903's user avatar
2 votes
3 answers
10k views

How to switch between command-line and GUI in VM on a Mac?

I have installed CentOS 7.1 in VMware Fusion of my Mac. I logged into the terminal (default runlevel 3) and started the GUI using the command "startx". I want to switch back to the terminal. Ctrl+Alt+...
user1897373's user avatar
0 votes
1 answer
88 views

diff style comparison of directory contents against line by line contents of text file

Unlike many of the file and directory comparison utilities out there, including diff, I've only seen literal file to file (sometime, more than two files) and directory to directory comparisons. I'm ...
TryTryAgain's user avatar
1 vote
1 answer
964 views

Terminal new window always shows -bash: Searching: command not found

When open terminal, it always shows -bash: Searching: command not found. It does not affect other functions, just each time, even though open a new terminal window, it still pops up at the top of the ...
CarolineGao's user avatar
2 votes
5 answers
406 views

How can I convert all “x”s to “y”s in filenames for a specific directory from the command line?

I have been naming files, of out habit as a programmer working on a server command line, with underscores “_” rather than spaces “"—because from the command line you have to escape spaces—but that is ...
J.Todd's user avatar
  • 159
1 vote
1 answer
360 views

How to get different prompt look for root and regular user

My .bash_profile has different styles of prompt for regular user and root but in order it to work the .bash_profile should be reloaded every time I switch users. How can I achieve this? Can I make ...
drew1kun's user avatar
  • 2,167
2 votes
2 answers
6k views

OSX bash command line countdown timer

I found here on superuser the following nice countdown script that I could include in my .bash_profile: function countdown(){ date1=$((`date +%s` + $1)); while [ "$date1" -ne `date +%s` ];...
Tim's user avatar
  • 175

15 30 50 per page