Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 37797

Questions about the Terminal application or its terminal emulation should use this tag. Use **command-line** for questions about shells or command-line programs that do not specifically involve Terminal.

1 vote

How can I revoke Terminal's access to dragged-in folders?

The action granted the app a security-scoped bookmark. There’s no supported user-level way to revoke such a bookmark. https://forums.developer.apple.com/forums/thread/739198
grg's user avatar
  • 206k
16 votes

My one-liner 'delete old files' command finds the right files but will not delete them

While there are alternative flags to find such as -delete and -print0, to answer the question of what the problem is with xargs and how to fix that problem… xargs -0 expects the null character to sepa …
grg's user avatar
  • 206k
4 votes

`exit` man page

The man page on SS64 was written by the site admin, so will not be found on your system. My evidence for this is the page contains a link to a Q&A on Unix & Linux Stack Exchange including the user ID …
grg's user avatar
  • 206k
2 votes

Convert passwordLastSetTime to date format YYYY-MM-DD

date -r seconds -I -I outputs in YYYY-MM-DD. Add -I to the one-liner given in https://apple.stackexchange.com/a/421447/37797 which appears to be the core logic to your shell script. lastset=$(date -r …
grg's user avatar
  • 206k
13 votes
Accepted

How to make normal command `ls` and the wildcard `*` in Zsh

The glob is expanded by the shell and the resulting arguments passed to ls as if you had written them out in full. gradle* matches once, on gradle@7. ls gradle@7 is run. Since gradle@7 is a director …
grg's user avatar
  • 206k
8 votes
Accepted

Stop showing path to desktop picture on desktop

Those screenshots you added are extremely helpful in identifying the problem. I recognise the drop-shadow on the text! This is the result of enabling the desktop-picture-show-debug-text option of the …
grg's user avatar
  • 206k
1 vote
Accepted

Escaped newlines make the code work wrong. Why?

The quoted example uses a backslash to escape a new line in the middle of what would normally be on one line. Without the backslash, there would be two commands, bazel run … and --bar=another…. The se …
grg's user avatar
  • 206k
3 votes
Accepted

is it possible to auto start command in mac when command exit

No need for an out-of-band monitoring solution; put the command in a loop to run infinitely. In zsh or bash, while true; do npm run watch; sleep 1; done If npm run watch exits, it will sleep 1s, then …
grg's user avatar
  • 206k
1 vote

Is is okay to just remove disk image file by throwing it to trash?

Disk images can be considered regular files and deleted as such. Dragging to the trash is one possible way. If the disk image is still mounted, i.e. open in Finder, you will be prevented from deleting …
grg's user avatar
  • 206k
3 votes
Accepted

How to add PATH environment variable to the HomeBrew Profiles

tl;dr You don't need build dependencies to install packages from a Bottle. I didn't require Go installed, Homebrew or otherwise, to install buf. Let's start with brew info buf to see what we're worki …
grg's user avatar
  • 206k
2 votes
Accepted

How to change system username via terminal

To change the user with username user whose home folder is at /Users/user to user2 run dscl . change /Users/user RecordName user user2 This doesn't change the user's home folder.
grg's user avatar
  • 206k
1 vote

OpenLDAP configuration via terminal on MacOS 12 and above (Monterey and Ventura)

You can configure LDAP with a profile. Create a Configuration Profile using Apple Configurator with an LDAP configuration payload. This gives you a .mobileconfig file. If you don't have an MDM soluti …
grg's user avatar
  • 206k
6 votes
Accepted

zsh ignores the shebang in macOS Monterey

Your script is being run with bash. $SHELL is set once to the path to your login shell when it starts, not a dynamically changing value for the shell currently executing the command that prints $SHELL …
grg's user avatar
  • 206k
5 votes
Accepted

Every time I open terminal I realize that zsh_history Symbolic Link has been deleted

It appears to be a common issue with zsh. https://unix.stackexchange.com/a/111730/45383 The easiest way to do this would be to not use links at all. The location of the zsh history file is determined …
grg's user avatar
  • 206k
7 votes
Accepted

Any way to create custom terminal keywords?

The ‘alias’ command defines aliases. alias pas="php artisan serve" The default shell is now zsh so you define this in ~/.zshrc. Source the file . ~/.zshrc for the change to take effect in the current …
grg's user avatar
  • 206k

1
2 3 4 5
15
15 30 50 per page