Tag Info

New answers tagged

1

To answer your question, your PATH has to be modified to: PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/opt/X11/bin:/usr/texbin so that your shell will find /usr/bin/dmd before any other one called from within one of the 2 Python library ...


0

If /usr/bin/dmd works and your path has /usr/bin in it, and your path is exported, then you can just type dmd. Otherwise you can change your path like this: echo "export PATH=\"/usr/bin:$PATH\"" >> .profile after which every new terminal will have the path you want. (this is the method used by homebrew, macports, etc)


1

I had the same problem. Fastest solution and worked on both computers was: (a) Go to http://www.code42.com/store/ (b) Download free version of CrashPlan (c) After clicking to install the pop-up with the application symbol (that you drop into your Applications folder) also has a small trashcan in the bottom right corner. (d) After installation complete click ...


0

This is by design. The vast majority of users want to install GUI software and adjust system settings, but do not want to install command-line software. Those same users would prefer malware have a harder time getting into the process, and often need to be protected from themselves ("Library"? Don't need a folder of books...). So the admin user is not root. ...


5

Even though the account is an administrator, you still need to use sudo to become the root user. Administrator still has restrictions on what files can be read or written to. For example, the /System/Library/User Template/ folder is set to System: Read/Write and even though you are an administrator, you won't be able to open this folder without either ...


1

According to man screencapture one can only save to the clipboard or to a file: there doesn't seem to be any way around this as designed. The description of the command uses the word 'or' to indicate that only one action is possible: save the screencapture to a file or to the clipboard:


1

Taken wholesale from this SuperUser.com question and answer... The issue is that the shell on the remote host is configured to send an escape sequence to set the terminal window title. This is a fairly common setup. The solutions mentioned in the blog post you linked to are correct. The simplest and most direct solution is to configure that same remote ...


0

Terminal windows can only be expanded based on the width/height of a single character in the font that is used. You might be able to experiment and find a size that is easy to read while allowing the window to resize perfectly.


3

Single quotes ('') suppress parameter expansion so you have to use double quotes: v() { osascript -e "set volume output $1" }


0

Click the apple icon in the top left "About This Mac", admittedly not Terminal. Do you have any reason to do this in Terminal?


1

I found the settings file by using the terminal command opensnoop to monitor all files accessed by any programm and found that the file that stores the underscan setting is here: /var/db/.com.apple.iokit.graphics


-1

I don't know - but I do use the free EasyFind (by DevonTech) that will search everything on your machine, every aspect of search.


2

It's your $PS1 - it's not properly escaped. You have to escape all non-printing characters with \[ and \]. For example, if you have export PS1='\e[32m\u \W\e[0m $ ' you have to change it to export PS1='\[\e[32m\]\u \W\[\e[0m\] $ ' or your cursor will appear far to the right because your shell thinks your prompt is that long, and when it retypes the ...


0

The unfortunate answer is: it's just you. My bash is: bash-3.2$ bash --version GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin14) Copyright (C) 2007 Free Software Foundation, Inc. And iTerm2 is the latest release and it behaves as expected: Ctrl-E during a reverse history search puts me at the end of the line, on character after the last ...


2

You are misunderstanding the way (Mac)Vim processes its configuration. Simplifying slightly, there are three layers to it on OS X: the vimrc and gvirmc files in $VIMRUNTIME are the runtime defaults for the Vim install. For MacVim, this is set to point inside the application bundle – the files you found. These will be overwritten each time you update ...


0

If you can, search for the files name. If it shows up, press or long press (click or right click) the file. Hopefully you'll be able to see the file storage path.


2

In a Terminal or script, you can use the pmset command to sleep/wake the computer and more. From: man pmset sleepnow - causes an immediate system sleep sudo pmset sleepnow Schedules the system to automatically wake from sleep on July 4, 2016, at 8PM. sudo pmset schedule wake "07/04/16 20:00:00" Note: I've added sudo to the above pmset commands as this ...


-1

In order to get ss, you would need to get the source code for iproute. Since you mention Red Hat linux, go onto a linux machine running Red Hat, and run the following command: sudo yum source iproute Now, copy over the source code to your Mac, and compile it. You could also go on the Red Hat packages site and get the source tarball. Note: I have not ...


3

Since I have a much newer system I couldn't accurately test with a 119 MB file as it took less then a second to copy in Terminal. So I created several much larger files, up to 2 GB, using dd and /dev/random as the source and made duplicates. I then rebooted and then did timed copies of each of the sets, one in Terminal and the other in Finder. This way ...


2

You have to let Finder know that you want a Boolean value (true or false): defaults write com.apple.finder AppleShowAllFiles -bool TRUE


0

Shift-Command-Period shows and hides the files in open/save dialogs, it might work in the main Finder.


3

The question itself isn't exact too, because the OP talks about: files names like ABC 123456 (without extension), but in the example code using *.txt extension add a dash between two blocks (e.g. where is the space) like ABC - 123456, but in the next taking about counting to 4 and count 3, e.g. not exacltly clear what the script should do for example if ...


0

I can't tell if this is serious or if I am being rickrolled, but the command below will attempt to download all images in numeric range 0000 to 9999. Find the lowest and highest numbers of images linked and insert those. However a lot of sites have protections against direct downloading, and this might be one of them... curl -O -s ...


2

If your file names are "ABC 123456" with single space between the first 3 and the following, then you are trying to replace the space with a character (or dash or something), so to look like ABC-123456. I found this article that explains how to do that. Example: Note that the following command will only replace spaces with hyphens. If you need a different ...


0

The | in such context always means use "either|or|else". So use either: VBoxManage modifyhd "/Users/user/VirtualBox VMs/Ubuntu/Ubuntu.vdi" --resize 20000 You have to use the absolute path to the file or the relative path starting from the current directory. or: VBoxManage modifyhd <UUID> --resize 20000 The UUID of the medium has to be ...


0

Applescripts aren't just plain text files. That's likely why this isn't working. Open Script Editor in your /Applications/Utilities folder, create a new document, and paste your applescript code into there. Save it as a regular .scpt file, and then you should be able to launch that from terminal using the osascript command you mentioned.


0

If you are looking for something to put into a shell script, you can run something like if [[ $(system_profiler SPDisplaysDataType | grep Resolution | head -1 | tr -d ' ') == 'Resolution:2560x1440' ]]; then # do whatever is needed to do for 2560x1440 end if You could also use a case statement to handle several ...


1

This is a feature of vim, although IIRC it wouldn't be enabled by default. backspace is a setting in vim, and you can set three different parameters: indent, eol, and start If you run :help backspace, it will tell you: Influences the working of `<BS>`, `<Del>`, `CTRL-W` and `CTRL-U` in Insert mode. This is a list of items, separated by ...


1

This one helped me: Open your Terminal preferences, go to Profiles > Window > Background (Color & Effects), and set a light blur. I use 30% to keep anything in the background from disturbing the readability of thin fonts on an already translucent window, so I never noticed the "burn-in" effect when moving to Yosemite. Source: ...


3

C-Kermit is alive and well in Brew, and can be installed with: % brew install c-kermit You, of course, have to have Brew installed.


0

Something like this should work: ruby -e "Dir.glob('* ').each { |name| File.rename name, name.chomp(' ') }" This will remove trailing spaces from every file/dir in the pwd.


2

Here's the script to find and remove trailing space from files and dirs: #!/bin/bash IFS=$'\n' for file in $(find -d . -name "* ") do target_name=$(echo ...


1

You have a couple of errors on your syntax. Replace the following lines: pages=`pdfcount "$f"` pagescut=`$(( ${pages} - 1 ))` With this ones: pages=$(pdfcount "$f") pagescut=$(($pages - 1))


1

For Wine under OS X I use Wine_1.7.36.dmg from "Wine.app Downloads" on kronenberg.org and XQuartz and both install and work nicely without the need to use MacPorts.


2

You need to separate the arguments on the command line. Try ln -s /Volumes/NONAME/POP-emailaccount@provider.net/ ~/Library/Mail/V2/POP-emailacount@provider.net (note the space character after -s)


-2

In fact you can not know the guest password, only the system knows it. As any password, they are encrypted, you can only reset them (on Mac) That's why you can't simply copy and paste the guest account to another computer to use it on the other Mac. So don't forget to trash the key chain folder when you are doing this ! Why then is there no password ...


3

echo is not portable as you experienced. I would suggest to use the POSIX alternative printf: printf "$b "


3

Echo is both a binary program (/bin/echo) as well as builtin command in some shells such as bash and sh. As man echo states, Some shells may provide a builtin echo command which is similar or iden- tical to this utility. Most notably, the builtin echo in sh(1) does not accept the -n option. Consult the builtin(1) manual page. In order to fix ...


0

I need to do some more research to get this right. I feel like its close, but applescript still doesn't like it. Maybe it will give you some ideas until I get back here to give it another shot. Btw this is going to be so much easier when you are using the choose file dialog. heres my non-working (yet) attempt. If you don't be me to it ill try to finish ...


2

Tl;dr For your Mac "lo0" is almost the same as the "me" is for you in your question! lo0: is the loopback address of your computer: wikipedia says: Implementations of the Internet Protocol Suite include a virtual network interface through which network applications can communicate when executing on the same machine. It is implemented entirely within ...


1

First I would note the day of that hint - April 2001 - so a very old version of OS X Next look at man shutdown -k Kick everybody off. The -k option does not actually halt the system, but leaves the system multi-user with logins disabled (for all but super-user). This means that all users are kicked off but also that noone can ...


1

No, ncdu is not available in OSX. But, if you want it, you can install it via homebrew. You just need to type the following to install it: brew install ncdu This is the version availabe: $ brew info ncdu ncdu: stable 1.10, HEAD http://dev.yorhel.nl/ncdu Not installed From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/ncdu.rb


1

The window should remember its last position. But will change it's size to fit the size you have in the preferences. You can see the current size of yours is the default. 80x24 You can change that in the Profile>Window Tab. (on your default profile) Window Size


2

One way to do it is Set your window how you would like it, Go to Window > Save Windows as Group... Enter a name next to Save As: Check "Use window group when Terminal starts" Click Save However, after you have launched Terminal, if you chose Terminal > New Window you will still have to resize the window. This is most useful if you want to have ...


0

You can save the below Applescript as a Application. Do not set stay open when saving. This script when saved as an App. Will allow you to configure as many windows as you need and open them in the same positions. You can save the Script any number of times as new App. and configure each App to control different sets of Terminal windows. When you run ...


0

Here's how you can switch Terminal's startup window group automatically: defaults write com.apple.Terminal 'Startup Window Group' 'four-windows' defaults write com.apple.Terminal 'Startup Window Group' 'five-windows' (four-windows and five-windows should be replaced with the Terminal window group names.) You can use AppleScript or Automator to make an ...


0

Finally i figured out that there is a way to list down all the local accounts. And this includes the mobile accounts of the network users. This command gives the above info: dscl /Local/Default -list


1

Depends on mouse you are using too I believe, why not something like this if its the regular Apple mouse? defaults write /Library/Preferences/com.apple.driver.AppleHIDMouse.plist Button2 -int 2 Or defaults write /Users/username/Library/Preferences/com.apple.driver.AppleHIDMouse.plist Button2 -int 2


3

You can use defaults or plutil command line tools. For defaults it looks like this: defaults write /absolute/path/to/Info.plist CFBundleExecutable -string <Executable> For plutil: plutil -insert CFBundleExecutable -string <Executable> Info.plist


4

The original post mentions that SSDs have a 1000-2000 cycle limit, which over-simplifies the problem. Individual cells in an SSD may have such a limit, but the SSD implements many different solutions: from over-provisioning and write-levelling to Sandforce's proprietary collection of de-duplication, compression, and data differencing techniques, which it ...



Top 50 recent answers are included