New answers tagged

0

It is not so that having an external disk near filled up causes slowness of the system. That it not a rule. Having 280 GB free space on a 10 TB external RAID-array is perfectly fine, and does not in anyway in itself cause any slowness. Of course if you're regularly adding data to the drive, you would want to consider adding extra disk space, as you would ...


1

Based on what you described, I can suggest two more options: alias youtube="youtube-dl -f best '$1'" ($1 - is the first argument following your command, if you have to use single quotes) youtube() { echo -n "YouTube link: " ; read _url ; youtube-dl -f best '$_url' ; } (multi command function with a prompt line) Or if you don't have to ...


1

Got it... tell application "Finder" set posixSource to (POSIX file "/Users/darwin/Desktop/test.txt" as alias) set posixDest to (POSIX file "/Applications/My Special App.app/Contents/" as alias) duplicate file posixSource to folder posixDest with replacing end tell ... and the one-liner: tell application "Finder&...


0

aliases are not set by terminal or iTerm they are a part of your shell. By default in BigSur it is zsh, for most other versions before the default shell was bash aliases do not take a parameter they just do a text replacement of the alias by the text to the right of the = If you need to do things with parameters then look at functions in the shell manuals. ...


1

According to Wikipedia: In computing, a hidden folder (sometimes hidden directory) or hidden file is a folder or file which filesystem utilities do not display by default when showing a directory listing. The ls command, of course, is a directory listing. The -a option "do not ignore entries starting with ." (ls man page) So, yes the file is ...


0

Use networksetup or scutil You can use it to at least establish/ disconnect connections to the VPN. Use this command to connect the VPN configured with the name "myVPN": networksetup -connectpppoeservice "myVPN" Disconnect from the VPN networksetup -disconnectpppoeservice "myVPN" When you want to check the connection status ...


4

PowerLog is malware that displays pop-ups and unwanted advertisements that do not come from the websites you are browsing. These PowerLog ads are displayed as boxes with coupons, underlined keywords (in-text ads), pop-up ads, or advertising banners. Virustotal PowerLog is usually bundled with other free software that you download from the Internet. ...


3

SIP (System Integrity Protection) is made up of a number of elements that work together in ensuring system integrity. Among these are for example protection against unsigned kernel extensions, protecting file system permissions for system files and directories, etc. When you list the status of SIP, you'll in some versions be informed of the status of the &...


10

Each Terminal tab is a login session on macOS by default. You can run w to see that each tab/tty running a shell has a process name starting with - attached to it (which indicates a login shell). Additional information (related to bash, but the same is applicable to other shells) What options does Terminal pass to bash on startup? Why doesn't .bashrc ...


7

!str Refer to the most recent command starting with str. this is the history expansion behavior. type man zshexpn and check 'Event Designators', you will get the answer An event designator is a reference to a command-line entry in the history list. In the list below, remember that the initial `!' in each item may be changed to another character by ...


0

I realized if you use Tmux and a session disconnects this happens if you have enabled the mouse on function within Tmux. I discovered this because I had two terminals open on my server using the same terminal program (Termius on mac). One terminal I was using Tmux and the other one I was not. Tmux had mouse option set to on so I could resize panes, click ...


-1

From anywhere start chrome path/file.html just type the file name with extension if you are at that folder where file reside and your default browser should be chrome. index.html if chrome is not default Browser for that file start chrome index.html


1

There is no .zshrc file unless you create one. You can create one with touch ~/.zshrc and edit it with any plain text editor you like.


-1

I'm not convinced that this is "impossible". I'm assuming that the connection that initiates from the remote box ssh's into yours? Maybe leveraging something like tmux on the remote server and within the script send the command to ssh to your machine? This article might be worth peeking at.


0

No you can't start iTerm from a remote server. But then macOS is not XWindows so you would use a different way. The way is to have the information about all the servers on your Mac Create a profile for each server in ITerm each one opening a ssh session. Then to access any system in a new window just open the correct Profile. To speed things up each profile ...


0

Detailed You can make all hidden files visible with this command in the Finder. defaults write com.apple.Finder AppleShowAllFiles 1 && killall Finder However, I prefer not to display hidden system files via the terminal, but rather with a shortcut. CMD + SHIFT + . If you want, you can make a file (several files) visible or invisible again. - Even ...


1

Since High Sierra, you can show hidden files in the Finder with the key command: Command Shift Period. This also toggles the show/hide status. No need for Terminal commands or third-party utilities, or relaunching the Finder.


2

From comments - The method in the linked question requires Finder to be killed. This will prevent its remembering currently-open windows. It appears in the particular circumstance that Relaunching Finder is sufficient - Opt/right click in Dock - which also preserves its current structure.


4

Open Terminal.app from the utilities folder Inside the terminal window, type cd then a space Open the parent window of the directory you want a listing of in finder (One folder / directory up from the one you want a listing of. It should contain the directory you want a listing of) Drag the directory you want a listing of into the terminal window, then hit ...


2

No. It just runs find command in the background to collect all file names and then it creates file name database from it. In any case you can simply rebuild the database by running sudo rm -r /var/db/locate.database and then sudo /usr/libexec/locate.updatedb in order to use locate command.


0

Check ChrisJohnsen/tmux-MacOSX-pasteboard: Notes and workarounds for accessing the Mac OS X pasteboard in tmux sessions. brew install reattach-to-user-namespace Then add to .tmux.conf: set-option -g default-command "reattach-to-user-namespace -l zsh"


0

Check the new reincarnation of the mutt - https://github.com/neomutt/neomutt


-1

Überprüfen Sie zunächst, welche Adapter zu Verfügung stehen: networksetup -listallnetworkservices Anzeigen des Proxy-Status: networksetup -getwebproxy "Wi-Fi" Setzen Sie einen Proxy: networksetup -setwebproxy "Wi-fi" 127.0.0.1 8080 Ausschalten des Proxys: networksetup -setwebproxystate "Wi-fi" off


0

You can have files in the Dock, but they have to be the other side of the 'dividing line' from apps. So a shell script file, with suffix .command, or .tool, could be in the Dock and would launch on a click. There are other places to have scripts readily accessible in the Mac workspace, of course, such as the Scripts menulet.


3

As of macOS Big Sur 11.2.3+ - and according to the updated man tmutil - you need to provide the date and time of each backup using -d and -t flags, respectively. So the following tweak is needed for the accepted answer: ## assuming you have the backup disk connected: latest=$(sudo tmutil latestbackup) sudo tmutil listbackups | while read backup; do if [[ ...


1

It seems like the partition may have been deleted. Try the -f option. sudo gpt create -f /dev/disk2 By default, one cannot create a GPT when the device contains a MBR, however this can be overridden with the -f option. If the -f option is specified, an existing MBR is destroyed and any par- titions described by the MBR are lost. - [GTP Man Page] https://...


0

Worth checking your Terminal preferences. From the keyboard, press the Command and comma keys [⌘ ,]. Then click on "Profiles" and select the "Shell" tab. Make sure the startup run command has the correct command. (Defaults to empty text.) Try unchecking the run command option and open another terminal tab. It should default to your system'...


3

Try networksetup ... From man networksetup .. NOTE must be an admin to run it. DESCRIPTION The networksetup command is used to configure network settings typically configured in the System Preferences application. The networksetup command requires at least admin privileges to change network settings. If the "Require an administrator password to access ...


0

Expanding on the answer of @Lokni, to use the php version of 'whatever homebrew installed' instead of /usr/bin/php, I added this as the first line of my ~/.bash_profile: export PATH="$(brew --prefix php)/bin:$PATH" In my case, brew --prefix php returns /usr/local/opt/php So now, if I open new terminal and type which php it says /usr/local/opt/...


-1

There are several histories for example bash and zsh. You can do this with nano. To do this, simply open the terminal With this you edit the bash history nano $HOME/.bash_history With this you edit the standard zsh history nano $HOME/.zsh_history If you want, you can do the whole thing using TextEdit. Bash: open -t $HOME/.bash_history Zsh: open -t $...


2

Jump Desktop will allow you to log in to the same computer you are using as a different user. You will have access to all of your files and apps. I have not done this extensively, but I did test it and it worked in Jump Desktop. The default macOS Screen Sharing.app will not do this. Screens 4 seemed like it was going to work, but it did not successfully ...


1

When you use the login command, you're switching accounts. You cannot then open the file in your current Finder/account if your current account doesn't have access. The analogous operation to doing login when interacting with Finder would be to fully switch over to that account. All running GUI programs are going to be using your current account. If you ...


0

According to the Smart Battery Data spec, the ManufactureDate is as follows: The date is packed in the following fashion: (year-1980) * 512 + month * 32 + day More specifically, when the integer is converted to binary: bits 0-4 -- day bits 5-8 -- month bits 9-15 -- years since 1980 Verifying this using my own machine, the integer derives to something ...


2

No, code execution doesn’t work that way on macOS Big Sur. Rosetta2 automatically translates the app when you install it from an Apple install package or translates on the fly if you otherwise side-load the executable and library code. It doesn’t virtualize a system - it translates code. Things like kernel extensions or scripts can not be translated and will ...


0

No. Your router tells your mac how to name itself and the Mac will take the name assigned to the router. Then you might decide to process those names or change terminal or decide to change your router setup. OS X computer name not matching what shows on terminal This is common that many DHCP servers don’t ask Mac what their name is or don’t record it ...


2

There shouldn't be any difference, no.


1

Using these instead works fine: function pngpaste() { local name="${1}" ensure-args name @MRET ensure isDarwin @MRET [[ "$name" =~ '\.png$' ]] || name+=.png osascript -e "tell application \"System Events\" to ¬ write (the clipboard as «class PNGf») to ¬ (make ...


0

Just try type exit on the GNU GRUB. It fixed the issue for me.


5

Single user mode is there in order to be able to diagnose and fix problems with the system. It is commonly used if there's an error with the system that prevents it from properly booting normally into multiuser mode (i.e. the default mode). The single user mode allows advanced users to examine the file system, change settings, and otherwise work with the ...


0

I've finally found the solution to this issue. First of all I listed the macos extensions: $ kextstat | grep -v com.apple Index Refs Address Size Wired Name (Version) UUID <Linked Against> 115 0 0xffffff7f83ef2000 0x29000 0x29000 com.intel.kext.intelhaxm (7.5.1) D0CC7B8F-1F62-33B1-BE6B-B5573D2A607B <8 6 5 3 1> ...


0

I don't have enough reminders to test for speed but give this a try. You can get the 'named' reminders into a list with one step and then coerce that list into your text output with a second. This should be faster than iterating through them individually. # Find all Reminders whose name contains "Alumni" set findMe to "Alumni" set answer ...


0

Allan's reply above worked but with a few modifications. I'm using a MacBook Pro running Big Sur. I had to add the frame rate & also use the command -frames:v 1 to export a single image. ffmpeg -ss 0.5 -f avfoundation -r 30.000030 -i “0” -t 1 capture.jpg -frames:v 1


0

For people using bash 5, you can install the homebrew package bash-completion@2 and add the following to your ~/.bash_profile. [[ -r "$(brew --prefix)/etc/profile.d/bash_completion.sh" ]] && . "$(brew --prefix)/etc/profile.d/bash_completion.sh"


-3

My contribution is more of a help, not really a solution, but maybe you could use it. What if you have changed the appearance of the terminal but you don't really like it? With this code you can reset it at any time. rm $HOME/Library/Preferences/com.apple.Terminal.plist; killall Terminal


0

I could make the opacity setting stick this way with MacOS 10.14 (Mojave). First, with a Terminal window open, I selected Shell -> Edit Background Color and there used the Opacity slider. This changed the opacity for the active window. Then I selected Shell -> Use Settings as Default. This changed the opacity in all open windows. New windows now also ...


-1

The default storage location for web server documents is /Library/WebServer/Documents. You can open this directory without any problems if you enter this code in the terminal. You will then be taken straight to the directory. open /Library/WebServer/Documents


1

Assuming there is only one instance of the file:///.../index.html URL in the contents of the entire scrolling buffer of the tab, then the following example AppleScript code can do that: tell application "Terminal" to ¬ set tabHistory to ¬ history of tab of ¬ front window as text set fileURL to ¬ do shell script ¬ &...


0

As @nohillside said in his answer, the font settings has to match perfectly a line in order to have a real fullscreen. So you can tweak Font size and Line Spacing in order to find a "line perfect" setup (tips: put a white window behind your terminal to easily set it up) I tried many fixed width fonts (SF Mono, Monaco, Menlo, PT Mono), and here a ...


0

osascript -e 'tell application "Finder" activate tell application "System Events" to keystroke "R" using {command down, shift down} end tell'


0

I was fiddling a round this for a while and I've found a simpler way to set the desired resolution. There is a tool displayplacer that let's you save and restore the current display settings. displayplacer "id:56A96CFC-7F21-168E-3D19-FC1626C9B248 res:2560x1440 hz:60 color_depth:8 scaling:on origin:(0,0) degree:0" To get the current settings of ...


Top 50 recent answers are included