Tag Info

New answers tagged

0

For TextEdit : $ ls ~/Library/Preferences/ | grep Text com.apple.TextEdit.LSSharedFileList.plist com.apple.TextEdit.SandboxedPersistentURLs.LSSharedFileList.plist For Preview : $ ls ~/Library/Preferences/ | grep Preview com.apple.Preview.LSSharedFileList.plist com.apple.Preview.SandboxedPersistentURLs.LSSharedFileList.plist


0

First, get your PATH back for the current shell by running PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" export PATH Then fix the PATH problems edit your bash-profile and put back the line you've deleted. If you don't remember, take the two lines from above path_helper takes its input from the files in /etc/paths.d, at least one of those files ...


-1

Try soa like dig soa xxx.xxxxx.xxx or host soa xxx.xxxxx.xxx check this link it explains it http://www.cyberciti.biz/faq/find-dns-domain-start-of-authority-record/


2

Assuming you're fairly default and using bash: http://www.tuxarena.com/2012/04/tutorial-colored-man-pages-how-it-works/ Short version: Add the following to your .bashrc file: export LESS_TERMCAP_mb=$(printf '\e[01;31m') # enter blinking mode – red export LESS_TERMCAP_md=$(printf '\e[01;35m') # enter double-bright mode – bold, magenta export ...


2

Stretch goal! To expand on the answer above (because the more appropriate related question is marked as a dupe and can't recieve new answers)... I've added a function to my ~/.bash_profile to handle revealing a file or directory: # Reveal a file or directory in Finder # ..expects only one argument # the argument is quoted to accommodate spaces in the ...


0

Seems to be a problem with pixman compatibility... $/usr/X11/bin/X dyld: Library not loaded: /opt/X11/lib/libpixman-1.0.dylib Referenced from: /Applications/Utilities/XQuartz.app/Contents/MacOS/X11.bin Reason: Incompatible library version: X11.bin requires version 33.0.0 or later, but libpixman-1.0.dylib provides version 25.0.0


0

You can do this with Mousescape: https://github.com/alexzielenski/Mousecape/releases If you use Max Rudberg's Svanslös cursors, the I-Beam shows up nicely on a black background with the caveat that it gives you some other kind of weird flashy cursors. I believe you can create your own if you have the interest.


1

beroe, I love your answer. Let me add a little detail… tell application "Google Chrome" activate end tell could be change to: tell application "Google Chrome" to activate Make you skip two lines… ;-)


0

I saw this extremely helpful answer to a problem I was having unzipping applications on another board from user patashnik: unzip doesn't handle the embedded resourceforks in ZIP files created by the Finder. If you want to unarchive those files from the CLI, use ditto: ditto -V -x -k --sequesterRsrc --rsrc FILENAME.ZIP DESTINATIONDIRECTORY If you want to ...


1

What you are really looking for is a smbclient alternative using smbutil but just like you, I couldn't make it work. So what you can do is to install samba with homebrew like this: brew install samba If brew link complains with: Error: The `brew link` step did not complete successfully The formula built, but is not symlinked into /usr/local Could ...


0

Create your .bashrc with your text editor & add any files you want. Go to terminal and type in: ls -a It will show some hidden files.


0

I made a command-line app that can change the desktop wallpaper from the terminal: $ npm install -g wallpaper $ wallpaper unicorn.jpg


1

One option is to use zsh, which has a CORRECT option that will suggest commands with a "nearby" spelling. Personally, I use zsh and prezto, which results in this: It's nice because the command is red while typing if it's not a valid program name, which means I usually catch the typo before I even press enter. Valid command names are green, though, so I ...


3

Searching Google for "homebrew command-not-found" (without the quotes) one of the results was: Ubuntu’s command-not-found equivalent for Homebrew on OSX I have not personally tried using it, so I cannot comment on how well it may work.


0

Launch Automator Choose Service for new document. From "Actions" menu, choose Utilities > Run Shell Script. Double click it in the menu, or drag and drop it into the right pane. Make sure "Service receives" is set to no input in Finder Add the following shell script into the Run Shell Script S1=`defaults read com.apple.finder AppleShowAllFiles` ...


0

I came across this post looking for a similar thing. Wasn't happy with the options available so made simple script. Its a terminal based thesaurus with text to speech. May be of interest ... https://github.com/aefty/thes


4

Yup, the system will recreate it automatically. Actually about .Trash, it is located on every drive you will connect to your Mac and where you will delete some files. Deleted files on external drive won't show in your local .Trash.


1

join works for me here: pse@Mithos:~/t$ join -1 1 -2 1 t1 t2 Model Decreasing Constant Increasing Decreasing Constant Increasing 2025 75.5 82.5 89.5 2.5 2.5 2.5 2035 65.5 82.5 102 2.5 2.5 5 2050 49.5 82.5 112 7.5 7.5 7.5 In case there are non-matching header lines in each file you need to get rid of them first, otherwise the joining will fail. ...


6

To know which shell are you using, use the following command: $ echo $SHELL It will return something like: /bin/bash or /bin/zsh After you know the shell, if the file .bashrc or .zshrc doesn't exist in your home directory (echo $HOME to find out), just create it. If you are using bash, you may have a file called .bash_profile where you can put your ...


0

In the case of logging in as a normal user and invoking su - root, I found that Mac OS X 10.8.5's bash was ignoring .profile and .bash_profile; I was unable to change root's $PATH by editing those files. What did work was editing /etc/paths. After exiting the root shell and entering again with su - root, the new path was present.


0

I stumbled across a seemingly stupidly easy way to enable/disable Internet Sharing the other day. There's just a bit of prep work to be done first. Open System Preferences > Network Highlight the interface you want to share your connection FROM and click the gear below the interface list Select 'Duplicate Service...' Give the duplicated service a name and ...


0

I have found out that typing system_profiler SPAudioDataType -xml does the job and lists all necessary information. It is solved :)


0

I stumbled across this yesterday while performing maintenance on my server unit. Give it a shot and let me know the outcome (AFAIK this is only viable on Yosemite). Open 'System Preferences' Select the 'App Store' pane Deselect the checkbox marked 'Install system data files and security updates' Hopefully, OS X should stop repairing your Extensions ...


0

I ran into this issue today, and was helped along by the information above, but I wanted to keep my editor set to sublime for other purposes. I added the following to my ~/.bash_profile, which solves the visudo issue, but doesn't change my default editor for git, etc. alias visudo='EDITOR=vi sudo visudo' When executed, this changes the editor to vi for ...


1

That message suggests that you don't have the correct privileges to run atq. Try running it with sudo from the command line to see if that helps i.e.: > atq atq: cannot regain privs: Operation not permitted > sudo atq Password: >


1

I believe this is exactly what you want: http://stackoverflow.com/questions/157959/how-do-i-make-the-apple-terminal-window-auto-change-colour-scheme-when-i-ssh-to All credit goes to Yurii Soldak: Put following script in ~/bin/ssh (ensure ~/bin/ looked before /usr/bin/ in your PATH): #!/bin/sh HOSTNAME=`echo $@ | sed s/.*@//` set_bg () { osascript -e ...


1

That would seem to imply the executable within the package isn't actually executable. Where did you get it from? If not Apple, I'd leave it well alone. If it was from Apple, try this in Terminal chmod +x /Applications/Install\ OS\ X\ Yosemite.app/Contents/MacOS/InstallAssistant


0

You can duplicate profiles, give them any name you want and save the login.


0

In order to successfully copy the files in the first place, you need at least have read access to the files at the original location. To make sure that you can read them, you can either change their permissions with sudo chmod -R o+rx /drag/your/original/folder/from/Finder/here or as suggested in the comments of your question have ownership of the drive ...


0

Assuming the structure is like main-folder subfolder-1 item-1 item-2 subfolder-2 item-3 item-4 and all the items are uniquely named, you can use cd main-folder mkdir ../target-folder mv */* ../target-folder/ to move everything into a target folder on the same directory level as the main folder. If you just want ...


1

Here is my take on this. add and load this function to your .profile. function cd { thePath=`osascript <<EOD set toPath to "" tell application "Finder" set toPath to (POSIX file "$1") as alias set theKind to kind of toPath if theKind is "Alias" then set toPath to ((original item of toPath) as alias) end if end tell return ...


0

Looks like the question is already answered here In the top rated answer, it says that it is ctrl+6 And if you have more questions, he also mentioned more keyboards with it. It is maybe Command though because that is on Windows


1

Ctrl-$ Mnemonic: the $ key is where ] would be on a QWERTY keyboard.


0

Thanks for the recommendation for Spark. I have just now tried version 3.0b9 and it worked perfectly in OS X 10.10.3 for creating a shortcut to launch the terminal. I use Ctrl+Opt+T, which is the same shortcut to open the terminal in my linux distro.


3

I haven't tested the answer by @klanomath, but there used to be a Python library to get the target of an alias, but Carbon support was removed from the Apple frameworks. It can be done in Objective C see http://stackoverflow.com/a/21151368/838253. The best bet is to use symlinks, but unfortunately Finder does not allow you to create these. I have written ...


2

To enable cd'ing into a folder alias I've found the following at Mac OS X Hints. Compile the source code below with the following command: gcc -o getTrueName -framework Carbon getTrueName.c This will create the ‘getTrueName’ executable in the same directory as the source. You can add it to your PATH, or just copy it directly to /usr/bin or /usr/local/bin ...


0

While a symbolic link (UNIX alias) looks the same as a Finder alias inside Finder, they are two complete different types of aliases. A symbolic link will only hold the path it leads to and will permanently or temporarily break if the resource is moved or on a disconnected drive or share respectively. A Finder alias is technically an ordinary file with ...


0

The best I could come up with was this: pkgutil --expand package.pkg /tmp/pkg; cat /tmp/pkg/PackageInfo | grep ./Applications | grep -m 1 .app\" | awk '{ print $3, $2 }'; rm -rf /tmp/pkg Not the most elegant solution, so I'm still searching for a way to do this without having to extract the .pkg first.


2

If you do not have a mail server running then there is nothing listening on port 25. Thus connection refused messages. So you need to run the mail server first. Also unless you work for Amazon your hostname is not .ant.amazon.com If you do ask your network admins. And this bit is a comment - I think you need to learn what telnet does before you start ...


0

I found this website that explains how to do it through terminal. Try it out on your Snow Leopard. It unfortunately didn't work for me on Yosemite, but it says the FX variant is as of 10.6, so you might be in luck. defaults write com.apple.finder MaximumLabelLines 2 defaults write com.apple.finder FXMaximumLabelLines 2 This changes the maximum number ...


0

XtraFinder XtraFinder add Tabs and features to Mac Finder. https://www.trankynam.com/xtrafinder/ It has much more convenient features than just "New Terminal Here": • Tabs & Dual Panel. • Arrange folders on top. • Cut & Paste. Copy queue. • Global hotkeys. • "Copy Path", "Show Hidden Items", "Hide Desktop", "Refresh", "New File", "Copy to", ...


0

After further research, I saw that Joomla 3.x does not work with php version 5.6 (which is what I was using) If you are having this issue, I recommend using Homebrew to get php 5.4 or 5.3. I did the following: brew install php54 In one terminal tab, I have php5.6 running with the following command: /usr/local/Cellar/php56/5.6.7/bin/php -S ...


1

I've found that I can do this by editing the .bash_profile file. Just added: alias my_alias='cd /my/really/long/long/path to .bash_profile, and after reopening bash my alias command worked just fine.


1

For OS X system files you cant not determine the end since it keeps working, but if you have start up apps you can do it for those. For the OS X you could use the first phase of boot process. it is indicated in the Console as bootlog[0]: BOOT_TIME 1428512373 0 After that the OSX is running mostly customization, like finding and connecting to your network ...


0

The Dock should be ready to take commands (e.g. mouse-clicks) as soon as it shows. If you are keen to know what is going on at login, you could add Activity Monitor to your login items and monitor CPU and disk activity as well as "task build-up" (like seeing what tasks are popping in to the list). Another approach would be to kick off the start process of ...


-1

There are several ways and I think the first step is to make the .command file just a shell script. Given you comment re automator I would suggest the easiest way is to create an automator/applescript that calls this shell script. This then can be called by calendar Other ways are using non GUI tools and call the shell script from a cron or launchd entry


0

In my case ssh-add -K didn't do the trick, I had to specify the key: ssh-add ~/.ssh/id_rsa


0

emond (Event Monitor Daemon) is just a "proxy" here. Based on several rules the daemon initiates several actions like logging events, sending emails or blocking hosts or users with the help of afctl activating the pf-anchor here: /Applications/Server.app/Contents/ServerRoot/private/etc/pf.anchors/400.AdaptiveFirewall. The rule for the adaptive firewall is ...


0

tell application "Reminders" activate show list "Reminders" end tell set stringedDate to "12/11/2015" set stringedHour to "10:00:00PM" set stringedAll to date (stringedDate & " " & stringedHour) tell application "Reminders" to tell list "Reminders" of default account to make new reminder with properties {name:"this is just test remainder", ...


1

You can't use > to compare numbers in bash (> is used to redirect output to a file), you need to run the comparison as part of a test/[ command. Also the call to bc doesn't seem to do anything, echo "iOS/i" | grep -o iOS | wc -l already outputs 1. The updated snippet looks like this (split on several lines for easier readability): if [ $(echo "iOS/i" ...



Top 50 recent answers are included