13 votes
Accepted

What does Cmd + K do in the Terminal?

Look at all the menus in an application to see the shortcuts. For Terminal.app look in the Edit menu. ⌘K Says clear to start. This clears all the text of the buffer just leaving the current prompt and ...
mmmmmm's user avatar
  • 29.3k
9 votes
Accepted

man command, and output decoration (bold/underline/...)

The theory The man program itself, doesn't talk directly to the terminal. It produces output which is text with a small amount of formatting. Another program, a pager, generally less, handles the user ...
Gilles 'SO- stop being evil''s user avatar
5 votes

Open .webloc file with colons in its name using "open"

The current directory can be referenced using the directory name .. So use open ./foo:bar.webloc This is not a valid URL, so it's treated as a filename. This is also a common way to deal with ...
Barmar's user avatar
  • 1,450
3 votes
Accepted

What are the directories I see when I hit tab on `cd ~` that are not seen in `ls ~`

This falls under the concept of parameter expansion in Bash and filename expansion in Zsh (essentially the same thing). Basically, there are two conditions: the tilde as the beginning part of a word ...
Allan's user avatar
  • 92.8k
3 votes

When looking at man page, some characters produced by `man` are not rendered

The "mysterious hex sequence" is actually just the UTF-8 bytes for an en dash - in hex that is 0xE28093. The en dash is supposed to be there - it's in the man page. The output of those bytes ...
jksoegaard's user avatar
  • 73.3k
3 votes
Accepted

Positioning the cursor with the mouse inside nano

You can ⌥ option + click in nano to move text cursor to the desired position.
Mateusz Szlosek's user avatar
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
  • 195k
3 votes
Accepted

Open .webloc file with colons in its name using "open"

I'm guessing that open thinks that the filename might be a URL. You would be correct in that guess. Unix/BSD/Linux/etc. (macOS is a certified Unix) don’t use characters for filenames. Instead, it’s ...
Allan's user avatar
  • 92.8k
2 votes
Accepted

How do I disable autosave in TextEdit?

It is possible. It's the "Ask to keep changes when closing documents" system setting (when enabled). Ventura: System Settings > Desktop & Dock > Windows & Apps > Ask to keep ...
TrueWill's user avatar
  • 208
2 votes

Is it possible to select Terminal output by using keyboard keys?

Can one select terminal output via keyboard? There's limited keyboard use when interacting with the scrollback buffer. It wasn't really designed to have "text editing" capabilities as that'...
Allan's user avatar
  • 92.8k
2 votes

How can I fix Hyper.is (a third-party terminal program) when it freezes on idle too quickly for my needs?

You didn’t indicate any error message like a “broken pipe” where the server is closing the connection due to inactivity and it always happens when disconnected from mains power and while idle (no ...
Allan's user avatar
  • 92.8k
2 votes

Unable to find include file on newly updated macOS(C/C++)

I was having this issue and finally tracked it down to an environment variable that was set in my environment. The variable is CPLUS_INCLUDE_PATH I had previously followed the workaround described ...
Dave's user avatar
  • 163
2 votes

Get Homebrew to re-create executable symlinks for an installed package (ghostscript)?

Homebrew doesn't overwrite existing files when linking (you should actually get a warning/error in that cases), but you can force it to link anyway: brew link --overwrite ghostscript
nohillside's user avatar
  • 94.3k
2 votes
Accepted

`sudo` and other commands not found in terminal in startup options mode

As already mentioned, you're running as root so sudo is not needed. However, to elaborate more, you're not booting from your regular system - many tools will not be available. There is nothing wrong ...
Ezekiel's user avatar
  • 7,147
2 votes
Accepted

When looking at man page, some characters produced by `man` are not rendered

I just found (with the valuable help of the comments by mmmmmm and jksoergaard) that my pagers (less and more) have problems displaying UTF8 multibyte characters, and that this is unrelated to man. ...
user1934428's user avatar
2 votes

What are the directories I see when I hit tab on `cd ~` that are not seen in `ls ~`

~ alone expands to your own home directory. There is also a syntax ~username that expands to the home directory of a given username. So if myUsername is my username, then ~myUsername is the same as ~, ...
HTNW's user avatar
  • 121
1 vote

OSC 8 styled hyperlinks in the Terminal

This has come up before (see Is there a way to make a link clickable in the OSX Terminal?, Configure OS X Terminal to detect URLs and make them clickable?), and it seems not to be possible to use OSC ...
nohillside's user avatar
  • 94.3k
1 vote
Accepted

How to launch an Application with a keyboard shortcut?

There's a simple way to launch any Application from a Service hot key. Launch Automator, make a new Quick Action [Service]. In the search bar, type Launch. Drag Launch Application into your workflow. ...
Tetsujin's user avatar
  • 109k
1 vote

man command, and output decoration (bold/underline/...)

By default, cat strips control characters when the output goes to a terminal. From man cat: -e Display non-printing characters (see the -v option), and display a dollar sign (‘$’) at the end of ...
nohillside's user avatar
  • 94.3k
1 vote

My Mac doesn't allow installation of any software

Your question isn't answerable with the data you provided, but here is how to find out what's happening - and maybe we can help you remotely if you can't see the issue once you get at the logs for the ...
benwiggy's user avatar
  • 29.9k
1 vote
Accepted

ls ~/Downloads Operation not permitted?

Downloads is a protected folder on macOS. When you run ls the first time, you should be shown a prompt (sample below) granting access. If you denied this prompt, or never saw this prompt, you can ...
Ezekiel's user avatar
  • 7,147
1 vote
Accepted

Brew can not find git

I suggest uninstalling homebrew and then reinstalling it and your packages following this guide. Although this would seem to be more tedious than fixing the PATH to git, a clean uninstall/reinstall is ...
JRFerguson's user avatar
1 vote

Getting a "command not found: conda" message whenever I open terminal

Yes, it is safe to delete. This is part of https://www.anaconda.com/ and removing it will not break your system (and based on the error message it isn't working anyway). If you need anaconda dev ...
rvs's user avatar
  • 111
1 vote
Accepted

Unable to open a .img image copied over ssh from Linode

The command you have found is for Linux - you cannot use that command on macOS, which is a completely different operating system. There's multiple problems with it: First, your command specifies to ...
jksoegaard's user avatar
  • 73.3k
1 vote

fatal: unable to access ... Recv failure: Connection reset by peer

I had the same problem as you, and finally, I solved it. First try this: git config --global --unset http.proxy git config --global --unset https.proxy and git config --global user.name "...
Fikri's user avatar
  • 11

Only top scored, non community-wiki answers of a minimum length are eligible