Tag Info

New answers tagged

3

~/Library/Preferences/com.googlecode.iterm2.plist Also note that you can set a custom location in iTerm Preferences under the General tab.


3

Already answered above but just give a little more context - the error message tells you what is wrong: -bash: $: command not found for instance: PROMPT> foo -bash: foo: command not found Often README files or tutorials will prefix commands with a '$' to indicate whatever you have as your UNIX prompt. You're not meant to type them.


7

The first $ in the command should not be typed. It represents the unix prompt. So, instead of $ cd web-starter-kit/app you should use cd web-starter-kit/app


6

It looks like you are appending '$' to the start of all the commands you are running. That is why bash is saying it can't find the $ command. For example, try just cd web-starter-kit/app instead of $ cd web-starter-kit/app.


3

/etc/profile is set to read-only for all users, so just using sudo won't help. What you can do: run sudo emacs /etc/profile type C-x C-q to toggle readonly mode within Emacs edit whatever you want type C-x C-s to save it Alternatively you can run EDITOR=emacs sudo -e /etc/profile which automatically creates a temporary copy of the file you want to ...


0

I noticed in the debug output that there is mention of port '22' even though I specified '2222'. It like you need to put a '-p' flag in when using terminal: ssh -p 2222 myname@xx.xx.xx.xx This seems a bit weird as with other terminals I was using: ssh myname@xx.xx.xx.xx:2222


0

As find's -name does not support regular expressions you will have to explicitly define the four cases find /source/ \ -not -name '*[0-9][0-9][0-9]x[0-9][0-9][0-9]*' -and \ -not -name '*[0-9][0-9][0-9][0-9]x[0-9][0-9][0-9]*' -and \ -not -name '*[0-9][0-9][0-9]x[0-9][0-9][0-9][0-9]*' -and \ -not -name ...


0

It turns out that the System Events process on my machine was frozen (which I discovered after a node process refused to be killed). Performing a full restart fixed the problem.


1

As Jay said : cat instead of type work : set bashFile to path to resource "reference.rtf" set the reference_data to do shell script "cat " & quoted form of (POSIX path of bashFile) display dialog reference_data But displaying it in a popup my not be very convenient. set bashFile to path to resource "arguing.pdf" tell application "Finder" open ...


2

The type shell builtin is used to see how it's arguments would be interpreted as a command. Try replacing type with cat and see if that does what you expect.


0

ls is sorting according to LC_COLLATE, it's just that most all of the LC_COLLATE files are set to do case sensitive sorting. http://collation-charts.org/fbsd54/ There are two that are set for case insensitive sorting: cs_CZ.ISO8859-2 and et_EE.ISO8859-15 et_EE.ISO8859.15 doesn't sort "Z" the way english speakers would want. cs.CZ.ISO8859-15 does a good job ...


0

5 months late, but I think this bit is useful. As far as an automator solution goes this is probably a little better. Instead of running finder just use an applescript. ie add action "Utilities Run AppleScript". Run this script: on run {input, parameters} tell application "Terminal" do script " " activate end tell return input ...


2

Click "View" / "Hide Tab Bar" and the tab bar will go away and come back only when there is more than one tab open.


-1

I would use this command: zip -r foo.zip foo -x "*.DS_Store" Found here: http://superuser.com/questions/198569/compressing-folders-on-a-mac-without-the-ds-store


0

I figured it out by searching it myself (sorry for not thinking of that first). You just go to the disk utility and click 'Repair Disk Permissions'.


0

People may want to check out zsh + prezto. There's a nice guide here. zsh is already installed in OSX. Prezto just adds stuff to your shell. Activate the syntax-highlighting module, and go to town :)


0

After you have selected the shortcut you want to change, press the tab key on your keyboard and you will be able to type in the new shortcut. Anyway, that is how I solved the problem :-)


0

One non-applescript solution to your problem may be to open the Terminal Preferences... select Settings. Then, under the Window tab select the Command Key check box. This will add a command key to the title bar to instantly switch to that window (so Window titles would have ⌘1, ⌘2, etc. appended to the window title.


0

Forgive me if this is a silly question but do you have Xcode installed? The OSX SDK should be installed on your system within the Xcode application bundle. You should be able to find it at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/. If Xcode isn't installed you can install it for free from here.


2

It updates the prompt to echo the Current Working Directory (CWD) and is defined in /etc/bashrc: update_terminal_cwd() { # Identify the directory using a "file:" scheme URL, # including the host name to disambiguate local vs. # remote connections. Percent-escape spaces. local SEARCH=' ' local REPLACE='%20' local ...


1

To keep restarting the job on succesful exit You can use launchd on OSX. For this You have to prepare *.plist file in order to "tell" launchd how to behave. To restart application on succesfull exit please look at KeepAlive -> SuccessfulExit key (more info: ...


1

Emoji are simply unicode characters that are rendered as such by the operating system. In the following screenshot, you can see that unicode is "allowed" in filenames: In fact, these are even rendered by Finder: To fix this, simply rename the file through Finder or Terminal. This happens because whatever glyph substitution algorithm that they use is ...


0

TotalTerminal has an option in its preferences panel now for enabling the same underlying option @Dan's answer illustrates setting manually:


1

Use find: find "$arg" -iname \*.txt -o -iname \*.h -o -iname \*.py|while read f;do :;done Use IFS= read -r if the paths can end with spaces or contain backslashes. Or install bash 4: brew install bash;echo /usr/local/bin/bash|sudo tee -a /etc/shells;chsh -s /usr/local/bin/bash Then: shopt -s globstar nocaseglob;for f in "$arg"/**/*.{txt,h,py};do ...


0

After curl http://theurlwiththexml.com: sed -n 's,.*<ImageStuff>\(.*\.png\)<.*,\1,p'|xargs -I, curl http://url1.com/, -o , sed -n disables printing, \( and \) are a portable way to specify groups, and p prints the pattern space. xargs -I specifies a replacement string and curl -o specifies an output file. Or using xmlstarlet, parallel, and ...


1

In my case it was the Maven Failsafe Plugin that caused the annoying window focus stealing of ForkedBooter, and setting the JAVA_TOOL_OPTIONS variable in .bashrc didn't help. This fix applies to both Failsafe and Surefire (although in my case, Surefire wasn't stealing focus). In your pom.xml, add a <argLine>-Djava.awt.headless=true</argLine> ...


3

You can achieve it with dd command. Here's an example: $ hexdump StringComparison | head -1 0000000 cf fa ed fe 07 00 00 01 03 00 00 80 02 00 00 00 $ printf '\x11\x11\x11' | dd of=StringComparison bs=1 seek=4 count=3 conv=notrunc 3+0 records in 3+0 records out 3 bytes transferred in 0.000293 secs (10238 bytes/sec) $ hexdump StringComparison | head -1 ...


-2

The issue here is not that gcc errors out guys, it's that Hash Command isn't found, so he needs to also install hash in order for that command not to error out.


0

You can reference the files like this: set myPath to (path to library folder from user domain as text) & "Keychains" tell application "Finder" to get files of folder myPath


2

I've checked my suggestion and it worked: if you try to open a file in Finder, this file will be opened with default Application, assigned to its extension. So, if you change default App for this file, you'll get it while opening file from Terminal by click.


1

Something that finally worked for me was this : Removed the rsa_id.pub file and regenerated a new one (must be in ~/.ssh/): ssh-keygen -y -f id_rsa > id_rsa.pub Ensured permissions were set to 0644 for both id_rsa and id_rsa.pub (must be in ~/.ssh/): chmod 644 id_rsa* Ran the following command: ssh-add -K After doing this, I was no longer ...


0

You probably want to use regex for this. Depending on the version of your question, it's pretty straightforward. There are a number of good sites to get started on the basics. In a sense, you already have seen a little taste of it: the "*" in "*.mp3" is a regex concept (meaning 'match any symbol 0 or more times'). Try something like ...


2

Instead of starting Emacs with open you can use emacsclient to send files to an already running Emacs. For this to work you need to start the corresponding server inside emacs by including (server-start) in your emacs init file.


1

You should also look at /etc/profile file, as it may have references to /etc/profile.d/rvm.sh. It's also worth it to read the manual for bash, as it lists all files bash will look at for configuration. This will be towards the end of the man page. To read it, in Terminal.app type man bash. Finally, you can run, again in Terminal.app, the following ...


0

This is a bit opinionated and not a direct answer: you can use iTerm and set a global hotkey for it through Preferences (⌘+,) > Keys > Hotkey.


0

Thanks to Mark for the solution, which was pretty basic, indeed: Open your .bash_profile file in Home directory (you can use terminal to open it, or tick "Show Hidden Items" in Finder on OS X 10.9.4). Add following to it: export PATH=$PATH:/Users/.../latex2rtf/bin Where the part after ":" specifies the location of latex2rtf file. In this case "..." is the ...


0

EasyFind is an excellent alternative app to get the job done. It's free and easy. You can search for text in files (even invisible ones). <= This may be an easier way to find your config files. You can get it from the App Store https://itunes.apple.com/us/app/easyfind/id411673888?mt=12 Disclaimer: I am not affiliated with the developer.


0

Open Automator, choose the service template, change "Service receives selected" to "files or folders", add a Run Shell Script action, change "Pass input" to "as arguments", and change the command to: for f;do /Applications/calibre.app/Contents/MacOS/ebook-convert "$f" "${f%.*}.mobi";done Or if you add 2mobi() { for f; do ...


0

A simple shut down, then start, of OS X should automatically remove debris from /Volumes If you like: disconnect/eject any removable media before the start. Or simply leave the media in place, and restart. There may be other approaches to dealing with volume debris whilst the OS is running but in my experience, it's often better to restart. Also ...


4

Yes, this file doesn't exist by default. The difference between bash_profile or .bashrc versus .profile is that the latter will be read by shells other than bash. For your purposes, you can simply name it .bashrc. Open up Terminal and enter the following command: cd ~/; touch .bashrc; open -a TextEdit .bashrc Now you have a created a profile, which the ...


0

Disk Utility No need for the commandline here. Open Disk Utility (/Applications/Utilities/Disk Utility), select your drive and click Mount. image comes from wikipedia


0

Using the purge command can have serious negative effects on the performance of the system (since you are essentially telling the kernel to forget all of its accumulated knowledge about your recent usage, walk through the inactive list and toss everything -- even if some process/driver was about to make use of it -- and then fault/recreate it all again from ...


1

You need to add ~/bin to your PATH variable. In Terminal, type cd to return to your home directory. Then, type bin/subl .profile to open your ~/.profile file. If it doesn't exist, Sublime will just create an empty file. Add this line to it: export PATH=$HOME/bin:$PATH and save the file. Close out of Sublime, and restart Terminal. You now should be able to ...


1

Apple offer Folder Actions to attach AppleScripts to folders. You can attach an AppleScript to perform any task with incoming files to a specific folder. See Folder Actions Tutorial: Automation, Meet the Filesystem for a tutorial and step-by-step guide.


0

This question is probably more suited for http://apple.stackexchange.com/, but I can't figure out how to suggest to move it there… If you have another Mac, the easiest way is most likely to boot the Mac you're trying to fix in Target Disk Mode (hold T when you hear the chime) and connect it to your other Mac via a Firewire or Thunderbolt cable. You should ...


0

This is how I fixed: nnoremap <silent> <ESC>^[A <Nop> nnoremap <silent> <ESC>^[B <Nop> nnoremap <silent> <ESC>^[D <Nop> nnoremap <silent> <ESC>^[C <Nop> Note: The "^[" characters must not be typed, instead you get them by doing: Ctrl-V and pressing the corresponding cursor arrow ...


3

Assuming it's the same as on Linux, you could also use: less /Applications/MAMP/htdocs/BO_V2/data/logs/log-2014-07-10.php Then press Shift+F to have it tail automatically, or just Shift+G to go to the end of file.


22

On windows, the Cygwin is a Unix-like environment and OS X is full on UNIX, so there is no need for any additions to get unix tools. Open Terminal.app and start with manual pages. The more and tail -f commands are typical unix commands to page, search, and watch a log file. For your example, the tail command to watch your log file is: tail -f ...


1

I would like to answer my own question, even though it is not an "answer," per se. After testing on several different machines, I am confident that this is a bug with Terminal (and perhaps other virtual terminals on other operating systems). I have tested this on the following machines that are owned by separate users: MacBook Pro (2012, 13-inch) running ...


2

Put it in your ~/.profile file.



Top 50 recent answers are included