Tag Info

New answers tagged

1

I use GitHub for a few of reasons: It’s where I got the template for a number of dot files I forked my dot files install script from a friend on GitHub It keeps what I use open for others to use I get an “unlimited” history of each file, not just the last 30 days I get to sync to several OSs that don’t Dropbox (e.g. FreeBSD)


1

I currently don't use github for dotfile syncing but I plan to do it. My reasoning is that I would like to have slightly different configs on different machines. To make that possible, you can basically have a master branch, and seperate branches for each device/device group as needed. If you add something new to the master branch, you can merge it with ...


0

There is no absolute need to install subversion, svn, via homebrew. Try removing the homebrew edition using: brew uninstall svn Then launch a new Terminal.app window and enter the command: svn --version If you have Xcode's command line tools installed, the command should work. If this does not work, see Xcode 4.4 and later install Command Line Tools ...


1

This solution works on a single file in Trash or multiple files deleted from within the same directory: If it's not essential for you to use Terminal, you can forget all those bash, zsh, and all other typealot ways to do this. Just navigate to Trash and CMD + Backspace the files you want to put back. If the deleted files come from different folders, then ...


0

I'm assuming you have IRAF installed from here, as per the instructions: http://iraf.noao.edu Basically, download, untar, run ./install Then, make sure you have XQuartz installed from here: http://xquartz.macosforge.org/landing/ Finally, make sure you're using csh in your xterm, when you start up, then run cl , or: $HOME/.iraf/bin/xgterm


0

You can use this command softwareupdate with -a and -i as root. So just type sudo softwareupdate -i -a in terminal. These are some wonderful steps to make you shell powerful: Use echo "alias update='sudo softwareupdate -i -a" >> .aliases to registe a aliase to update quickly. Use exec $SHELL -l to reload your shell. Use update and type your ...


0

The way I achieve this is ensuring that tmux is installed on the machine I'm SSHing to. Once you've issues tmux you can do ctrl-b % to split the screen vertically, or ctrl-b " to split it horizontally. This will give you two sessions within the same terminal window, and can also be persistent across logins. This may not be exactly what you want though.


0

This might help you with a couple of methods to overcome your issue I believe: http://stackoverflow.com/questions/6964486/osascript-syntax-error-expected-end-of-line-but-found-command-name-2741


2

Your script above is running two different scripts. One is changing the working directory to your user desktop folder (~/Desktop). The other script is downloading www.google.com and putting it in a document in your root directory (/), which doesn't have permissions to do so. You can fix this by reduce it to one statement of do shell script like such: do ...


1

As I understood you want to use ⌘Cmd bindings with Terminal.app and pure terminal applications like shell(bash/zsh/etc), ViM, emacs, and so on. Please, comment me if I misunderstood you. Base Terminal.app threats all shortcuts with ⌘Cmd key as menu shortcuts this keypress will not transferred to terminal applications. This completely prevent using ⌘Cmd key ...


1

Your question is not clear, however it appears that you want to enable more robust keyboard shortcuts in Terminal. I suggest you download iTerm2 https://www.iterm2.com You can map many different keyboard shortcuts from iTerm's preferences as shown below:


1

In this solution we need to tell ssh to create a pseudo terminal with -tt then use a heredoc to send the commands to the remote location. ssh -tt user@domain.com <<EOF cd /var/www/website/ git pull logout EOF


0

I've not tested this on a huge hierarchy of nested folders, but assuming you use List view, giving you the opportunity to Opt/click the reveal arrow & then select all - The Finder since Yosemite has a built-in Search & Replace for file names. Right click, Rename [n] items… I just tested on some recipe text files I intentionally added accented ...


0

You removed the application according to the documentation. Now unset the variable ur_setup unset ur_setup You are good to go.


0

Try this: for i in `echo $PATH | sed 's/:/ /g'`; do printf "\033[1;103;30m $i\033[0m\n" ls "$i" | grep "ur_setup" done This will iterate through directories included in PATH, print them in yellow and then if there's something in there matching ur_setup pattern, print it. It can be done cleaner, but it's not worth creating a big function for ...


1

Apple will not update Bash, because the latest version is licensed under GPLv3, which Apple cannot use. They have updated most of their other shells though. ZSH for example is mostly up to date.


1

Generally speaking installing XCode and/or the command line tools should have added those paths to your shell path variable. Odd that it didn't. Perhaps someone with more familiarity with XCode can help with that. You could just type the whole path to the app every time you want to use it. But that would be a PITA. Adding the path to those apps does not ...


0

It seems that the windows.plist has been corrupted during the backup, as it's empty. The Terminal restores correctly when doing the following test: Run Terminal. Type anything like: echo test 1. Kill the terminal explicitly, e.g.: killall Terminal. Run again, it should have the previous message/state. Removing files and restoring from it, it'll have the ...


0

On the short term, within a Terminal enter: unset DYLD_FALLBACK_LIBRARY_PATH and check that: /usr/bin/sudo is working. Your description let think of an installer which modified your working environment in closed relationship with the X11 environment. To further analyze where this problem is coming, within a Terminal search which initialisation file ...


2

It’s not AppleScript, but is there a reason why the time command isn't applicable? It’s used like this: time <command> time find /opt time tar xf bigFile.tar.bz2 It gives output like this: real 0m0.044s user 0m0.000s sys 0m0.008s


0

Aha, I just delete .bash_sessions and .bash_history. It's back to normal now. rm -rf .bash_sessions/ .bash_history


0

I was unable to find acceptable explanation for that. It does not occur with every command. For instance, if you try sudo ls you can usually terminate it using ctrl+c. You can still press enter immediately followed by ctrl+c, that usually works.


0

The answer is to hold down command + shift + option whilst dragging the body of the terminal (not the tab) back to the terminal you wish to merge. Source: http://azaleasays.com/2014/03/05/iterm2-merge-a-pane-back-to-window-or-tab-bar/


1

You can confirm where it was installed in /Applications by using Terminal.app: cd /Applications ls -lt | grep -i cheme This should print the name of the directory where it was installed (which should be MIT:GNU Scheme). You can access it from the command-line by adding the following directory to your PATH: /Applications/MIT\:GNU\ ...


4

Your Trash is a unison of the directory ~/.Trash and the .Trashes directory on any other mounted file systems. To view the contents of the GUI Trash in your shell ls ~/.Trash /Volumes/*/.Trashes/$(id -u) 2>/dev/null


7

You can run ls -al ~/.Trash to show the content of the Trash of the current user. To see the content of all Trashes, use sudo ls -al /Users/*/.Trash from an admin account. And if you also want to include the content of the Trash on external volumes, use sudo sh -c 'ls -al /Volumes/*/.Trashes/*/'


3

You can simply add your export PATH... line in your bash_profile file. This file is run every time you start terminal and will modify your PATH variable as you want. You can open/edit this from anywhere in terminal using open ~/.bash_profile You probably also want to check that there are no conflicting export PATH... statements that overwrite each other ...


-1

Alternatively, you can also visit the Security & Privacy panel in System Preferences right after trying to run the program from Spotlight. The panel should have an option to run (the last tried) program from an unidentified developer.


1

Instead of having an Automator/AppleScript applet to run this command, you can use Terminal to automatically run that command upon launch. In Terminal, go to Terminal > Preferences. In the General pane, under "Shells open with:", select "Command (complete path):" Enter your command in the text field. Now, when Terminal opens, that command will execute ...


22

Once upon a time, computers were routinely hooked up to teletypes (teleprinters) which would print all text on paper in real time as it was received. Although teleprinters didn't have any facilities for underlined or bold-faced text, outputting an underline, backspacing, and printing something else would cause that something else to appear underlined. ...


0

In order to get the right color scheme the background needs to be explicitly declared inside LSCOLOR (gnu) or LS_COLOR (linux) and match the non-ANSI one set in your Terminal.app (i.e. Window > Background > Color and Effects). So, something like LSCOLORS=eadafafacafafacacaeaea would work while something like LSCOLORS=exdxfxfxcxfxfxcxcxexex wouldn't.


1

In addition to the other emacs shortcuts posted by theoden, you can also use ^a (control + a) to return to the beginning of the line to edit it, and ^k (control + k) to cut the line. Hope that helps.


2

If you are using emacs keybindings (default for bash, zsh, pry (ruby interpreter), python and many more), ^u (control + u) might be what you want - it erases everything prior to your cursor. If you want to stop writing the command and forget what you did, use ^c (control + c), which is, by the way, a SIGKILL(9) signal (see man signal). By the way, the ...


4

As an alternative, I have the following shell function defined (called from Oh-my-ZSH's OS X plugin): man-preview () { man -t "$@" | open -f -a /Applications/Preview.app } This results in the desired man page being opened in Preview with all the pretty formatting one could desire. It's easy enough to add this single alias to your ~/.profile (I think ...


2

Or you can use ManOpen by Carl Lindberg to lookup and print any man page. ManOpen was first developed for NeXtStep and still works thanks to Carl.


16

Mateusz's answer is correct, but it is worth pointing out that rather than stripping out formatting intended for a tty, you can have man format differently. For example, you can get a nicely formatted pdf instead with: man -t ls | pstopdf -i -o ~/ls.pdf


31

From man man: To get a plain text version of a man page, without backspaces and underscores, try # man foo | col -b > foo.mantxt man prints formatted version of man page, underscores and double letters are parsed Its not so much that they are 'parsed' but rather "if you don't have a terminal, bold format is to be displayed as a repeated ...


3

The a2ps utility is for formatting files for printing on a PostScript printer, hence its name is not a2pdf. The file you created under Linux (or OS X), which is a miss-named .pdf file, is in fact a PostScript file and many Linux Distros will open it anyway. Thus leading you to believe is was a PDF Document when in reality it's not. Looking at the file ...


1

The region is stored in ~/Library/Preferences/.GlobalPreferences, as the second part of the AppleLocale variable. Some examples of the AppleLocale variable: en_US system language set to English, region set to US ja_JP system language set to Japanese, region set to Japan en_DE system language set to English, region set to Germany You can get more info ...


1

In order to get the foreground behave as it should, the background needs to be explicitly declared with LSCOLOR (gnu) or LS_COLOR (linux). The trick is to use the same color both for your ANSI palette background color and in your Terminal window non-ANSI setup. I don't know why, but it works.


2

You're missing the initial line of your script file - the "shebang". Put the following in your script file: #!/bin/sh CX_LICENSE=LS open -n /Applications/Inspire\ Designer\ 10.0\ GA/Inspire\ Designer.app/ That should work - the file you had before did not have enough information to tell the operating system how to run your script. You want to run a set ...


0

One way to solve this is to run the following to switch root's shell to bash: sudo dscl . -change /Users/root UserShell /bin/sh /bin/bash This solution has fixed my issue as well.


2

All that is possible by using fs_usage with several options. You may also pipe it to grep to further restrict the output. To exclude a process or a pid (and also fs_usage itself) use the -e option: sudo fs_usage -e WindowsServer sudo fs_usage -e 123 Specifying the -f option turns on output filtering based on the mode provided. The possible modes are: ...


1

Ok. So I found out a solution. Turns you can simply use Automator and save the shell script as an App. Just open Automator; select "Applications" and then "Run a Shell Script"


-1

Found it sed -n l Really useful for debugging problems with terminal programs that benefit from complex bindings like vim. Or just use cat or sed


0

If what you posted was literally what the directory name is, then this should work: cd /Users mv hook1\?\?\? hook1 The problem, as fd0 points out, is that you have invisible/unprintable characters in your directory name. Use basic, non-destructive shell commands to isolate the directory name using wildcards, then rename it. For example, try this: cd ...


1

Alright, I think I found the answer: tell application "Terminal" do script "sudo /usr/local/bin/openconnect --user={user} {host}" activate end tell


0

I'm not sure what version of OS X the other answer or original question is for but it's not accurate on 10.10 Mavericks. You need this: security find-generic-password -D "802.1X Password" Maybe networks using actual Apple AirPort hardware are saved in the keychain Differently?


0

Option if you don't want to use gdate: Enable SSHD (Remote Login) under System Preferences, Sharing Enable 'Wake for network access' under System Preferences, Energy Saver put this code in a file like 'wakeup.sh' in your home folder: shopt -s expand_aliases #NB: 7 is the waiting interval. Works for me. Increase as needed. alias myDate='date -v+7S ...


0

This works tell process "SecurityAgent" to click button "Allow" of window 1



Top 50 recent answers are included