New answers tagged

0

You can display BASH variables on your .bash_profile. Then compare the output when you manually open the terminal with output when cd to app opens the terminal.


-1

The FAQ has a section on this and a specific uninstall script, start there to get a clean system and then install again. https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/FAQ.md To uninstall Homebrew, paste the command below in a terminal prompt. ruby -e "$(curl -fsSL ...


0

I use the following script to toggle internet sharing on an early 2011 MacBook Pro / 10.11.3 El Capitan, so with newer hardware you might get away with shorter delays. It adopts ideas from several scripts posted for this purpose (localisation, turning wifi on/off using networksetup, close System Preferences when done). tell application "System Preferences" ...


-1

If you're facing this issue as a Zsh Iterm2 user do this: Preferences >Profiles >General >Command: /bin/zsh -il


0

I'm assuming you mean aliases, not proxys. Add it to ~/.bashrc and ~/.bash_profile. See this guide for more depth. I don't believe OS X supports a ~/.bash_aliases file.


0

Terminal Preferences are stored in the com.apple.Terminal.plist file (/Users/$USER/Library/Preferences/com.apple.Terminal.plist) and while it can be read using the defaults command, nonetheless much of it may not be discernible. Copy and paste the following command into a Terminal and then press Enter: defaults read com.apple.Terminal


1

You didn't say what the name of the file you downloaded was or its URL, (Are we just supposed to guess?). Assuming it was the WebSploit-Framework-3.0.0.tar.gz file from WebSploit Framework, under normal circumstances* you'd simply unpack the file by double-clicking it and it should create a folder named websploit containing two files, install.sh and ...


0

I found a convenient way to apply the tags from one file to another since this was my main goal. Install tag via brew and proceed as follows: tag -a "$(tag -Nl source_file)" destination_file I'd still be more than interested if there was a way to apply all extended attributes from one file to another if there is any way.


0

You can force Terminal to become frontmost by adding the line: activate application "Terminal" into your applescript. if you launch Terminal with: tell application "Terminal" to open location "ssh://user@example.com" then Terminal won't open an extra window.


1

The Image File created by Burn.app is a RAW Image and does not contain a recognizable filesystem that OS X understands and why hdiutil fails. It's also why an "Audio CD.isoInfo" file needs to be created, so the Burn.app can burn the image it created back to optical media (CD). Since you created the Audio CD Image with the Burn.app then why don't you just ...


0

Found this networksetup manual. To do this, you just need to write networksetup -setwebproxy "Service name (e.g. Wi-Fi)" proxy.server.com port


0

The latest version of iterm2 (I'm using Build 2.9.20150812-nightly) has this feature, but in order for it to work with multiple lines you have to enable shell integration as described at https://gitlab.com/gnachman/iterm2/issues/3638. To install the latest iTerm, I use brew and execute the following: brew tap caskroom/versions && brew cask install ...


0

Another option find . -name "*3*" -exec open {} \; Will run open on any file with 3 in it's name from the current directory down. The spaces and backslash matter in this case.


1

Try open $(ls | grep 3). Depending on your specific needs, you can also skip the grep part and use open $(ls *3*) (or even open *3*) directly.


0

Run chmod 755 NameOfYourScript from terminal, then ./NameOfYourScript If you ls it will appear green


0

In order to amend your PATH so that /usr/local/bin is ahead of /usr/bin do the following: execute . ~/.bash_profile execute PATH="/usr/local/bin:$PATH" in the current shell restart Terminal You may also want to amend /etc/paths so that /usr/local/bin is listed before /usr/bin. You'll need to sudo your editor in order to do that. sudo open -t /etc/paths ...


1

You can execute shell script directly on OS X, so there's generally no good reason to do that. However, if you really feel like it, you can use do shell script "script" to execute a shell script in AppleScript.


1

When you double-click a .command file, Terminal.app will open, and execute /path/to/file.command ; exit; which means it will execute the content of the file.command script, and THEN exit. If your Terminal is exiting before your executable can receive input, that seems to indicate that either your .command is not calling your executable correctly, or your ...


0

If you have Xcode installed, you can use Instruments.app (Apple documentation You can use this command to launch it open /Applications/Xcode.app/Contents/Applications/Instruments.app Once opened, this application can monitor all processes on your machine for file reads, writes, and locks, among other things. There is a template called File Activity that ...


0

Open terminal.app (Applications -> Utilities -> Terminal or via Spotlight) and issue this command: sudo fs_usage | grep [path_to_file]. Path_to_file may be to any of your found 'xEy40' files. See, if it'll show anything.


1

The documentation lacks one important step: reboot or sudo reboot After the reboot the user enjoys visible admin rights in System Preferences -> Users and Groups. But: even without rebooting the user is admin already - it's just not visible in the PrefPane. If you login as joeadmin immediately after creating the account (e.g. fast user switching) ...


6

Appifying with Platypus: Download Platypus and create an app from the shell script. Example: The settings above create an app with a progress bar (including details) and it can be quitted - the rsync process has to be canceled (killed) manually though. The app itself can be found with Spotlight. Simple AppleScript solution: In Mavericks (and ...


0

CMD+Delete -- Send Hex Code -- 0x15 To delete the whole line (similar to Option+U)


0

Found solution myself. In system settings on the Mission Control tab the second option of the top group must be checked. I don't know exactly how it is in English, it shall be something like 'Switch to space with application windows when switching to an application' or something like that. I used this as a tip, it says about the third checkbox, but in my ...


0

There is certainly more then one way to do this and what I'm presenting is not necessarily the best way, however it is a way that works. Create a bash script using the following code. #!/bin/bash c=0 for f in *.zip; do x="$(zipinfo -t "$f" | awk '{print $1}')" c=$(( $c + $x )) done echo "The total file count is:" $c Then you'd cd to the directory ...


0

In terminal copy sudo rm -R /Applications/CrashPlan.app enter password, done. You will still see the app icon but all process are stopped for good; for what I can see.


-1

Add a "sleep" command to pause the script's execution. Sleep 5 Will pause for 5 seconds.


1

mysql-utils is a different cask brew cask install mysql-utilities if you do a brew search mysql you can see the caskroom casks $ brew search mysql automysqlbackup mysql ✔ mysql++ mysql-cluster mysql-connector-c mysql-connector-c++ mysql-sandbox mysql-search-replace mysqltuner homebrew/php/php53-mysqlnd_ms homebrew/php/php55-mysqlnd_ms ...


2

This link explains what you want very briefly, with this Apple doc doing a better job, and this older post really explaing. /etc: Machine local system configuration, holds administrative, configuration, and other system files; Contains host-specific configuration files. /opt: Has a very similar role to /usr/local and they seem interchangeable. ...


0

Disconnecting from WiFi Networks sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/local/bin/airport sudo airport --disassociate Run these commands in Terminal. Your WiFi will disconnect, while the AirPort Network Interface remains enabled.


0

By running /usr/sbin/system_profiler SPUSBDataType I get... USB: USB Bus: Host Controller Driver: AppleUSBUHCIPCI PCI Device ID: 0x2688 PCI Revision ID: 0x0009 PCI Vendor ID: 0x8086 Generic USB Hub: Product ID: 0x0008 Vendor ID: 0x04fe (PFU Limited) Version: 1.02 Speed: Up ...


0

What you're asking for is simply: curl http://example.com/commandPage.txt This will get you the contents of that URL. If you need to see the headers as well, you can add -v. Otherwise, you can even use telnet to do so. Just use: telnet example.com 80 And paste the full request as quoted above, followed by one empty line.


0

As nice only gives priority over over applications it won't stop 100% CPU usage. Cputhrottle has worked for me in the past, though haven't checked it for 10.11 : http://www.willnolan.com/cputhrottle/cputhrottle.html


-1

appify seems to be what you're looking for…


0

You can open separate instance of Terminal.app with /Applications/Utilities/Terminal.app/Contents/MacOS/Terminal & You'll have separate icon on the Dock also. However You'll not be able to distinguish them in ⌘ cmd+⇥ tab because they are going to be called simply "Terminal" and have the same icons.


0

Based on this question and answer the following should work: Disable ~/.profile and ~/.bash:profile by renaming it: mv ~/.bash_profile ~/off.bash_profile mv ~/.profile ~/off.profile Create a new file ~/.bash_logout with the content shell_session_update echo "shell_session_update" > ~/.bash_logout Enter killall Terminal Open Terminal and enable ...


1

Once it says "Process Completed", the Terminal's session has been terminated, and there is no way to restart that specific session. You may close the window and open a new one or open a new tab on the same window.


0

Add the following to your .zshrc: autoload -Uz compinit compinit that should get you going. Now, read man zshcompsys


2

When the Shell exits, it means that you are done. So one option is to close the window and manually start another one (or you can simply press cmd+N to automatically open another shell). Another option that can save you some time is to make Terminal automatically close the tab after the exit process has been performed properly. Open Terminal Preferences > ...


3

Using Apple's mdls: mdls -name kMDItemNumberOfPages file.pdf to get just the number of pages: mdls -name kMDItemNumberOfPages -raw file.pdf


0

You can use pdf command line tools (xpdf) from foolabs.com There's pdfinfo which outputs something like this: Tagged: no Form: none Pages: 4 Encrypted: no Page size: 612 x 792 pts (letter) (rotated 0 degrees) File size: 134885 bytes Optimized: yes PDF version: 1.4 So You can get number of pages with: ...


2

You didn't do wrong, but the point with rsync is that after the initial backup/copy, subsequent rsync runs are clever enough to only copy/backup stuff that's changed. So say you do your 300GB backup, then a week later want to backup again, if you've only made 5GB of changes on your disk, then rsync will only try to edit/backup this 5GB, rather than you ...


0

They both remove the icon cache and it's content with the first and second command. The difference in the third command is that in Method 1 the com.apple.iconservices.store is just renamed (so it can be recovered if things go wrong), in Method 2 it is directly removed. From a functional point of view, there isn't really a difference. As Method 1 implies ...


3

The actual display of a process between (…) means this process was detached from its controlling terminal (here ttys002). This means that ^C, ^\, ^S, ^Z don't have anymore effect on it. It's behaving in daemon mode. This also means you can't send it a hangup either. The correct way to deal with this case if unwanted, is to get the number of its parent ...


1

This is a zombie process. Here's how to get rid of it from this answer on superuser: Sadly, it appears that killing of zombies is all about killing the parent, and if the parent is /sbin/launchd, you can kill it only with rebooting. It would be a Very Bad Idea to kill launchd, but you can tell it to HUP. Try sudo kill -s HUP 1 That ...


1

Far less can go wrong if you pipe the input: cat words.5.txt | /path/to/redirect In your case, ./program might be needed depending on where you are compiling things or omitting the path entirely. From your edit this should work too: ./redirect < words.5.txt That bash error is due to the program not existing in $PATH echo $PATH


0

It is a good idea to check whether the monitor in question is already using RGB before the above is attempted as it may not achieve any benefit. To check: Utilities/System Information->Displays and look to see if it is using RGB (You can also check in System Preferences->Displays-> Color->Open Profile->Header->Space) if so then your problem lies elsewhere. ...


0

Try: tell application "Terminal" if not (exists window 1) then reopen activate do script "echo hi" in window 1 end tell


0

I think the simple answer is no, if the question is whether the native ls command can be configured to list directories before it lists non-directories. One of the comments suggests a shell pipeline, but rather than going to that trouble it might be easier to write a script. The following python code is by no means intended to be a complete substitute for ...


1

In Finder try using this: Kind is Folder Name ends with son This should display all folders ending with "son". Try also, begins with and contains for similar searches.



Top 50 recent answers are included