New answers tagged

0

system_profiler is the tool in mac OS to show hw or sw configuraion. Get the datatye you want to look for using --listDataTypes. $ system_profiler -listDataTypes | grep Audio SPAudioDataType Then fire the command, $ system_profiler SPAudioDataType Audio: Intel High Definition Audio: Audio ID: 128 Headphone: Connection: ...


1

Just tap the Tab key twice (TabTab). You'll be prompted if you want to see all possible commands. Tap y and you'll be presented with a list. You can do that same thing for individual commands to see all options for that specific command.


0

Like fd0 commented above, the best source for quickly listing most everything you can do in the Terminal, is by using the Bash builtin compgen. Compgen interfaces with the "completion" function in Bash, so it is intended to keep a list of most everything you can do in the shell. So it is interesting that technically compgen is listing commands, aliases, ...


0

Unfortunately, there isn't another way from the command line other than installing Homebrew, an unofficial package manager for macOS and then typing brew install python3. This method does pose some issues. When installing Python via Homebrew, it does not remove any old version of Python (for compatibility reasons). This means old versions could be sitting ...


0

Looks like homebrew installed svn in /usr/local/Cellar/subversion/1.9.4 So I added it in $PATH export PATH=$PATH:/usr/local/Cellar/subversion/1.9.4/bin/ Added it in ~/.bash_profile. Then execute - source ~/.bash_profile and all seems good again


0

Here are the SVN binary packages: https://subversion.apache.org/packages.html I had previously faced a similar issue and this solved the issue for me. Also, when I tried using brew I had an issue, so I used MacPorts.


0

Since this is not working for you I'm going to suggest you do as fd0 suggested and use SetFile. This will be used in conjunction with GetFileInfo, both of which are a part of Command Line Tools for Xcode. You do not need to install the Xcode.app which is ~3.80 GB, just ~160 MB for Command Line Tools for Xcode. In Terminal: xcode-select --install See How ...


0

You can use PyInstaller, which is a free program that does the exact thing you want. As the official website says: PyInstaller is a program that freezes (packages) Python programs into stand-alone executables, under Windows, Linux, Mac OS X, FreeBSD, Solaris and AIX. Its main advantages over similar tools are that PyInstaller works with Python 2.7 and 3....


2

Use cURL (curl). It's a command line tool that transfers data using various protocols including HTTP. The beauty here is that you don't need a GUI browser; everything will be handled at the command line level. The "button" you want to press will be located in some sort of form. You can use the Developer Tools in Chrome or Firebug in Firefox to see the ...


2

You should consider using opensource Selenium. With a Selenium IDE plugin to Firefox you can record your actions (opening a page, clicking on a button), replay these songs, and generate Python or Ruby scripts rich you can customise and call from CLI. Sample script testing default Apache availability might look like this: #!/usr/local/bin/python DEST_URL='...


0

Here's a addition to @pasawaya's excellent answer. If you want to execute your applescript from the command line, you don't need to enter every line separately with the -e option. osascript -e 'multi-line-applescript here' will work also. Example: osascript -e 'tell application "Safari" activate tell application "System Events" keystroke "f" using {...


1

You could install brew and use it to install a more recent version with the command brew install screen. That will currently install version 4.3.1, which (as of writing) is almost the latest release (a new release of screen came out less than a week ago and isn't in brew yet). You will then be able to run it from /usr/local/bin/screen. You can create an ...


0

This problem is caused by OS X bash session restoration process which inserts in every '.session' file command like this: echo Restored session: суббота, 25 июня 2016 г. 23:29:08 (MSK) We should not use symbols like '(' in echo command text without being wrapped in quotation marks, but OS X forgot about it, alas. The only way for me to get rid of this ...


1

For those using iTerm, the AppleScript syntax has change in iTerm version 3. Here's the full procedure to follow to create a shortcut in the Finder. Launch Automator. Select "Application" : Choose "run Applescript" : Paste the code below: -- get the current directory in Finder on run {input, parameters} tell application "Finder" set ...


2

I know that this is quite an old post, but I just stumbled upon it from Google while searching for something similar (mostly just wanting to list active fonts via Terminal.) I ended up remembering that activated fonts are listed in System Information which can be pulled from the system_profiler command. That being said here's the command to pull font ...


1

There is a large highlighted first line of the installation instructions "You must have Java 7+ installed on your system in order to run Alda." So install the JDK (not JRE) from Oracle as per Oracle's comment The Java Runtime (JRE) that you download from java.com or oracle.com contains a plugin to run Java content from your browser. In order to use the ...


2

The list of spaces is stored in the following file. /Users/YOURUSERNAME/Library/Preferences/com.apple.spaces.plist For example on a machine with the dashboard and three desktops: <key>Spaces</key> <array> <dict> <key>ManagedSpaceID</key> <integer>3</integer> <key>id64</...


1

Typing open . in Terminal will open the current working directory in a Finder window. But there is also an alternative version open `pwd`


1

There are several possible explanations for negative ping times: You are running OS X on a PC with a AMD Athlon™ 64 X2 Dual Core Processor which has a bug in the power management which may not only effect Windows but also OS X installations. Google is tired of getting pinged 38325 times and is sending erroneous timestamps in the ICMP echo replies - ...


1

It is likely that your Torch installer complained with the following message: Not updating your shell profile. You might want to add the following lines to your shell profile: . ~/torch/install/bin/torch-activate You should manually add the suggested line to your profile. If you use bash (which is default on OS X) you can do it by: echo . ~/torch/...


0

Usually the proper disable Login Shell value is: /usr/bin/false instead of /bin/false. So I don't know if your /bin/false is just a typo or not. Even using the false UserShell I haven't been able to reproduce your problem though. You can try the following: open Terminal and enter dscl . read /Users/user_name to check if the user user_name is still there....


1

Go to: Preferences > Profiles > Keys Look for the actions of ⌥← and ⌥→. They would have been mapped to: Send Hex codes Change them to Send Escape sequence with Esc+B for backward and Esc+F for forward.


2

It is very common to create such text interface application using the ncurses library. You can use ncurses from Swift programs by importing it: import Darwin.ncurses Then you can follow ordinary ncurses tutorials to get a grasp on how to build up user interfaces using ncurses. In particular, you'll probably find the following tutorial helpful. It is on ...


0

If you are managing a single-user environment, such as a shared MacBook, you could potentially have each user's .bashrc copy a base hosts file, then append their custom one to the end of it. For example: sudo cp /etc/common_hosts /etc/hosts sudo cat ~/my_hosts >> /etc/hosts This would effectively give every user their own custom additions to the ...


0

Run this on terminal: curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash Then, do this: vi ~/.bash_profile Add this lines: if [ -f ~/.git-completion.bash ]; then . ~/.git-completion.bash fi That's all. This worked for me.


0

Since you have made a full backup, I recommend a full wipe and restore. 120GB plus CoreStorage plus "I had 1TB before" sounds like this is a fusion drive that you have disconnected. Reboot the machine in recovery mode (Command-R at power-on) and open Disk Utility. Very easy from there to reformat the internal drives either separately or as a fusion drive ...


1

The command is supposed to move the tmux process from a newly created bootstrap context under the root, to the user's login bootstrap context. To explain that in slightly more common terms: macOS (formerly OS X) is built with a Mach-kernel at the lowest layer. Programs executing at this layer are called tasks. On top of the Mach-kernel is the BSD ...


0

With the help of javadevg and the answer of AppleScript get active Application, i created the following solution: tell application "Terminal" activate set position of front window to {1, 1} set size of front window to {111, 111} end tell tell application "System Events" set frontmostProcess to first process where it is frontmost set visible of ...


1

If you want it back to the default setting, then in a Terminal run the following commands: defaults delete com.apple.screencapture location killall SystemUIServer The default location is the User's Desktop and does not require the location key to be set in the com.apple.screencapture.plist file, hence the location key is just deleted as it only exists ...


1

The problem is that the command: defaults write com.apple.screencapture location /Desktop/ will set the default location for screenshots to be /Desktop/. What you actually want is to set it to be /Users/yourusername/Desktop/. Try this, replacing yourusername with the username for your account: defaults write com.apple.screencapture location /Users/...


0

I have not scored enough points (yet) to mark this as a duplicate, but on How can I access the keychain remotely from the command line? you will find the solution to help you out here. In short: Add "security" to the "Access Control", re-login and run security unlock-keychain ~/Library/Keychains/login.keychain before running security find-generic-password.


-1

I've found the solution. The problem is, that homebrew installed an optional newer version of curl, but the command do shell script does use the old version. After a hint from a friend I used which curl in terminal and apple script editor and get different results: Terminal says: /opt/local/bin/curl Apple Script do shell script says: /usr/bin/curl So the ...


0

I had to fix the script a bit more. For files or folders ending in the letter 't', it would also delete that letter. And the call to check if the file exists wasn't working properly so changed "target_name" to $target_name and it works now. #!/bin/bash ...


0

What makes you think it doesn't encrypt the files? The files are encrypted, see image below, however encrypting does not obfuscate the filenames. If you do not want to be able to see filenames then the only option with just using the zip command is to encrypt or password zip the encrypted or password protected.zip file again. In other words, a protected ...


3

You need to properly uninstall AVG AntiVirus for Mac first. See: How to uninstall AVG AntiVirus for Mac To uninstall AVG Antivirus for Mac: Run the AVG AntiVirus for Mac Click the AVG AntiVirus Menu bar, and click Uninstall AVG AntiVirus Click Continue to begin the uninstallation process AVG will run the uninstallation The Uninstallation ...


1

activate application "Terminal" tell application "Terminal" set position of front window to {1, 1} set size of front window to {1, 1} end tell tell application "System Events" to keystroke "your message here\rexit\r" Additionally you can get help from AppleScript get active Application to put focus back on original application


0

The following solved it for me: Go to: Terminal > Preferences Scroll down to: Shell Change, /bin/bash to: /bin/sh


0

I think you're trying to set up port forwarding, to allow yourself to ssh in from outside, and changing the port to keep it slightly more secure? You don't need to change the port used internally (inside your network) - you just need to change the port used from outside of your network. Then, set up a rule that passes connections on the desired port to the ...


3

Replace your link with this one: itms://itunes.apple.com/WebObjects/MZStore.woa/wa/viewRadioStation?id=ra.978194965 You can open it without open your safari. Of course, only works with iTunes installed.


1

In iTerm2 you hold down alt (left or right) and click to move the cursor to any position on any line.


2

selecting Use option as meta key allows alt/option to be used instead of esc.


1

In the second screen shot, it looks like you're looking at man builtin and the Command column, the first column, is in bold text and not visible. Looking at the Bold Text color shows it being rather dark, as dark as the Background Color & Effects in the first screen shot. So, change the Bold Text color to the same color as the Text color or just a shade ...


0

If you want to use iTerm (iTerm2), do the same as @tlane's answer, except use this for the AppleScript: on run {input, parameters} if application "iTerm" is running then tell application "iTerm" create window with default profile activate end tell else tell application "iTerm" activate ...


0

Open iTerm2 preferences and go to Profiles tab. Select your desired profile and go to Keys tab. Tap plus sign (+) and type the following: Keyboard Shortcut: ⌘cmd+B Action: Send Text In the next line add the following command: git name-rev --name-only HEAD\n After that, when you hit ⌘cmd+B, iTerm send that command to your terminal and will return your ...


-1

Mackup is what you are looking for. https://github.com/lra/mackup/tree/master/doc


1

The problem, embarrassingly enough, turned out to be an uppercase letter in the lpadmin command I was using.


0

You can use "touch -mt YYYYMMDDhhmm" followed by your file name/path, of course replacing YYYYMMDDhhmm with your desired date. I recommend typing "man touch" into terminal to look at the manual and different command options there.


3

LINE indicates the TTY the process is running on. It is correct about you being logged into your computer twice, as you are logged in once to Cocoa (the OS X desktop), console, full path: /dev/console, and again in the terminal, ttysXXX, full path: /dev/ttysXXX (where "XXX" is a three-digit number, starting from 001). console is Darwin's (OS X kernel) only ...


-1

Your partition table seems to be hosed: the type of disk0s2 should be: 2: Apple_CoreStorage Macintosh HD 86.5 GB disk0s2 instead of 2: Apple_HFS Macintosh HD 86.5 GB disk0s2 I recommend to backup Macintosh HD with Time Machine immediately. Booted to Internet Recovery Mode erase your disk. ...


-1

It is because the Linux file system is something that OS X cannot natively read. The easiest thing to do is to is load up a live Linux CD and change the partition to something OS X can read like ExFAT, or MSDOS. Once that change has been made, OS X should be able to see it; allowing you to manipulate the partition. The other option is to load up FUSE for ...



Top 50 recent answers are included