32 votes

I think I downloaded spyware! I used a curl command in terminal given by a fake support user to download a .sh file

There's no need to post the script; I downloaded it. It's a highly obfuscated shell script that seems, most importantly, to do the following. First, it installs an extension (presumably malicious) in ...
Linc D.'s user avatar
  • 761
14 votes

I think I downloaded spyware! I used a curl command in terminal given by a fake support user to download a .sh file

Based on analysis by Linc D., but I don't see it doing much changes to the system itself. Instead, the primary impact is this: Treat all passwords you have stored in any web browser, all browser ...
jpa's user avatar
  • 291
10 votes

Link command in terminal vs ln vs symbolic link (ln -s) differences between them?

On macOS, both executables have the same inode number, so technically they are the same. $ ls -il /bin/{link,ln} 1152921500312524105 -rwxr-xr-x 2 root wheel 101968 Mar 21 07:13 /bin/link* ...
nohillside's user avatar
  • 101k
10 votes
Accepted

Is it dangerous to leave “.DS_Store” files left in Git commit history?

Have a look at what is stored in the .DS_Store file. Whether it is going to be dangerous or not depends on whether there is anything that could be stored in that file in your particular directory that ...
Jack Aidley's user avatar
10 votes

Is it dangerous to leave “.DS_Store” files left in Git commit history?

I would remove them git rm .DS_Store and update your ignore file. They don’t add to your project and could leak data from other file names you didn’t stage for checkin. You should know best on what ...
bmike's user avatar
  • 236k
4 votes
Accepted

How to install official python releases in MacOS without using the GUI

Once you have downloaded the python .pkg from https://www.python.org/downloads/ you should be able to install it on the command line using the installer command. Running sudo installer -pkg path/to/...
benwiggy's user avatar
  • 35.8k
3 votes

Where's the `info` command in recent macOS versions?

The info command was removed starting with macOS Ventura. As already stated in the OP's answer, the info command is available via Homebrew's texinfo formulae. However, if you are using the version of ...
David Anderson's user avatar
3 votes
Accepted

How to exclude a folder from `find`?

In the first command, the name of the directory you want to prune is just '.Spotlight-V100' (without the trailing slash): find . -name .Spotlight-V100 -prune -o -type f
Linc D.'s user avatar
  • 761
3 votes

Can anyone improve my batch rename script to make it recursive?

Assuming you want to apply the replacements to every subdirectory find . -type f -name '*.tmp' -exec sh -c ' f=$1 case $(file -b "$f") in *Excel*) ext=.xlsx ;; *Word*)...
nohillside's user avatar
  • 101k
3 votes

I think I downloaded spyware! I used a curl command in terminal given by a fake support user to download a .sh file

The OP's question was originally posted at Stack Exchange, where the following image was included. The image shows the output after executing the commands given in the OP's question. (Note: I redacted ...
David Anderson's user avatar
3 votes

Link command in terminal vs ln vs symbolic link (ln -s) differences between them?

I think the correct answer here is very historical. In Unix version 6, the filesystem was not strictly hierarchical. You could actually have multiple names for a directory. This was "eliminated&...
David G.'s user avatar
  • 131
2 votes

otool shows only single architecture for system fat binaries in macOS

See this nearly 10-year old question https://stackoverflow.com/questions/27354315/what-is-the-difference-between-mach-headers-and-fat-headers regarding mach and fat headers. I believe it is still ...
Gilby's user avatar
  • 10.9k
2 votes

Where are the TimeMachine Backup snapshots in Terminal on macOS Ventura?

Your new backups are using APFS format, the old ones were HFS+. This has brought a major change to Time Machine in terms of how to find the backups and, more importantly, much increased reliability. ...
Gilby's user avatar
  • 10.9k
2 votes
Accepted

How to make Homebrew directories writeable by multiple users?

Homebrew should only be maintained by one (admin) account, you will run into permission and other issues otherwise. On my Macs, I solved this by setting up a password-less ssh login from my main (non-...
nohillside's user avatar
  • 101k
2 votes

Can anyone improve my batch rename script to make it recursive?

Use zsh for any file manipulation that doesn't need to be portable. It's just simpler (even if the benefits are relatively limited in your case compared to typical file renaming questions). To ...
Gilles 'SO- stop being evil''s user avatar
2 votes

Can anyone improve my batch rename script to make it recursive?

I don't think you mean recursive, as that would involve the script calling itself. You probably mean iteratively search sub-directories. Simple fixes to your original script Try adding */ to the *.tmp,...
Greenonline's user avatar
  • 2,004
2 votes
Accepted

Where's the `info` command in recent macOS versions?

info is a GNU application to read info files. Info files are a form of marked up documentation, the format was defined before HTML. The UNIX standard documentation is man pages or the --help argument ...
mmmmmm's user avatar
  • 30.3k
1 vote

port: command not found

PATH doesn‘t get passed by sudo, to avoid security issues. To make sure port is accessible, add a file containing its path to /etc/paths.d.
nohillside's user avatar
  • 101k
1 vote
Accepted

How can I mount a TimeMachine Backup snapshot in the Terminal via mount_apfs?

Part 1 - the role of /Volumes/.timemachine There is a misconception about what is in /Volumes/.timemachine/<GUID>/. It contains mount points which may or may not have mounted TM snapshots. Some ...
Gilby's user avatar
  • 10.9k
1 vote

Mac screen sleeps shortly after Mac woken by pmset

This is correct and expected behaviour for a scheduled wake. macOS is looking for a reason to stay awake; specifically, macOS is looking for user activity or at least device input. If there is no user ...
Graham Miln's user avatar
  • 43.8k
1 vote

Trying to merge multiple folders - I messed up

Is there a way to reverse this and get things back into place? No, not without a load of manual copying (dragging and dropping) of the folders back to their rightful place(s). You can't just "...
Greenonline's user avatar
  • 2,004
1 vote

Issue with running SH file

You can only execute a file if it has the execute permission. To give bin/EagerGradle the execute permission, run chmod +x bin/EaglerGradle You may want to run chmod +x run.sh as well so that you can ...
Gilles 'SO- stop being evil''s user avatar
1 vote

Link command in terminal vs ln vs symbolic link (ln -s) differences between them?

Multiple file names can be hard linked to the same file. Each link can occur in the same directory or different directories. For example, if two difference collections contain the same image and both ...
David Anderson's user avatar
1 vote

how to install SBCL on Apple Silicon without brew and without sudo / admin?

as mentioned in the comments of the question, I did xattr -d com.apple.quarantine ./sbcl and it was able to run sbcl (the 2.4.0 arm version binary). Did not need admin password or anything for this to ...
xdavidliu's user avatar
  • 1,096
1 vote

Does this `last` output from macOS terminal describe a remote access login to my computer?

Something is executing the Apple-created shell script /Library/Application\ Support/Apple/Remote\ Desktop/Notify. That script then runs, does what it was told to do, and then exits your shell once it'...
gurple's user avatar
  • 121
1 vote

Hide specific file extension

Not exactly a solution through Terminal, but you can achieve your goal with an AppleScript. All you need to do is to create a Quick Action using Automator, and then set it to run the following script: ...
Mehrshad Khansarian's user avatar
1 vote

Password Change Not Working (Big Sur)

This superuser comment might help: In recovery mode, you aren't running from your normal system volume(s) or the user accounts DB on them, so changes to the user database don't affect your normal ...
malhal's user avatar
  • 2,102
1 vote

How can I permanently unhide invisible files on mac (not just make invisible files visible!)?

To unhide hidden files that don't start with a dot, use the xattr command under macOS Terminal: xattr -d com.apple.FinderInfo /my/hidden_file (you can drag&drop /my/hidden_file from the Finder if ...
Pigeo's user avatar
  • 33
1 vote

How can I determine the battery level of my magic mouse from the command line?

As of 2024 (some older answers floating about seem out of date) this one-liner will do all of your Bluetooth accessory battery levels: ioreg -c "AppleDeviceManagementHIDEventService" | egrep ...
Ian Atkinson's user avatar
1 vote

How to create an icon for Homebrew installed software (Evince) in macOS?

You can use the Apple ScriptEditor for a simple start-up script. Enter this into the editor: do shell script "/usr/local/bin/evince" Afterwards export it as "Evince" (File->...
pisker's user avatar
  • 111

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