I want to make backups in Safari once a week. Tell me how to use the terminal commands to export bookmarks? Thank you.
plutil -convert xml1 -o ~/Desktop/SafariBookmarks.xml ~/Library/Safari/Bookmarks.plist
I saw it on https://www.dropboxwiki.com/tips-and-tricks/export-safari-bookmarks-to-html-for-osx
Related
Another small question. I just recently migrated to ZSH and, so far I am loving it! My question is how can I open a file using TextEdit so that I can edit it using a GUI? Make no mistake, Vim is an amazing command-line tool for editing files in the terminal along with nano.
Let's say that I wanted to open the .zshrc using vim :
vim ~/.zshrc
In the same way, open the .zshrc using nano:
nano ~/.zshrc
How can I open the same ~/.zshrc file using text edit through the terminal?
Thanks a lot and I really appreciate your help :)
Here is the solution, I know it's a bit tedious but, you can open the ~/.zshrc using this command :
open -a TextEdit ~/.zshrc
Text Editor (gedit) is the default GUI text editor in the Ubuntu operating system.
To open a specific file: gedit filename
To open multiple files: gedit file1 file2
Here's More Information
I've got a question about installing ANTLR on my Unix system (MacOS Sierra).
I followed the Quick Start steps (ANTLR 4 Quick Start installation steps for OS X) as described on the homepage of ANTLR 4. Everything seems to be working fine but whenever i close my Terminal the export and alias commands seem to have disappeared. Does anyone have an idea what i might be doing wrong? Thank you!
p.s. I'm new to OS X and using the terminal.
Append the export and 2 alias commands to the .bash_profile file in your home directory.
Every time you open a terminal, the contents of that file is loaded.
So the steps i took was as followed;
Open terminal
enter cd /usr/local/lib
enter sudo curl -O http://www.antlr.org/download/antlr-4.5.3-complete.jar
enter touch ~/.bash_profile; open ~/.bash_profile
Text editor opens up.
Paste the following;
export CLASSPATH=".:/usr/local/lib/antlr-4.5.3-complete.jar:$CLASSPATH"
alias antlr4='java -jar /usr/local/lib/antlr-4.5.3-complete.jar'
alias grun='java org.antlr.v4.gui.TestRig'
Save the file
reopen the terminal. Test if antlr4 and grun works.
I want to use Emacs as and editor and shell.
On Windows 7 I installed cygwin , X11 and emacs.
In terminal I added to /etc/profile file these lines:
XWin -multiwindow 2> /dev/null&
export DISPLAY=:0.0
sleep 1
emacs 2> /dev/null&
I created a shortcut that execute this command: C:\rhcygwin64\bin\mintty.exe -
Now every time I start that shortcut it starts emacs. No problem.
My goal is: associate some file types like .txt , .csv and etc with emacs in order when I start foo.txt it'll open in emacs.
When I tried to do it 'Set Associtation' control it accepts only file name and it does not take '-'. Hence when I try to open foo.txt it does not work. I tried to create a shortcut to mintty.exe but it didn't work either.
Could someone help me to create association in order to start to mintty.exe but rather mintty.exe - ?
Thanks in advance
I am taking my question off .
I realized that my problem is related to subshell issue ... when I try to invoke first cygwin, then emacs under it and etc.
I decided that I will not use much Windows Explorer but rather go directly to the file and open it. This way I don't need file association.
Please close my ticket.
Thanks
Context
I want to open a Firefox browser from the command line and have it go to youtube.com
I have tried:
open /Applications/Firefox.app --args -remote "openURL(www.youtube.com, new-tab)"
It successfully opens a Firefox, but does not navigate to youtube.com
Question:
How do I fix this?
open -a Firefox 'http://www.youtube.com/'
If firefox is your default browser you can simply use: open 'http://www.youtube.com'
Maybe you can append two aliases, edit ~/.bash_profile, append code below:
open_by_browser(){ open -a $1 $2}
alias firefox='open_by_browser firefox'
alias chrome='open_by_browser "Google Chrome"'
then you can open html file by Firefox
firefox xxx.html
or by Chrome
chrome xxx.html
The others' answers work by the way, but another way you can do it is:
/Applications/Firefox.app/Contents/MacOS/firefox "youtube.com"
You can open Firefox to a specific url and pass params if you want. Note: kiosk mode is an example only supported in Firefox 71 beta.
open -a /Applications/Firefox.app "https://stackoverflow.com" --args --kiosk
I want cscope to open files in MacVim instead of vim, so I'm trying to have the path to MacVim as the Value of the EDITOR environment variable which is used by cscope:
$ export EDITOR=/Applications/MacVim.app/Contents/MacOS/MacVim
If I'm now trying to edit a file from within ctags, it won't work and throws this error message:
$ MacVim[8384:10b] No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file, exiting
Calling MacVim from the commandline with
$ /Applications/MacVim.app/Contents/MacOS/MacVim
works, though.
How can I fix this?
Make sure you put the mvim script in your path, and try this out:
export EDITOR="mvim -f"
This was the ticket for me when using MacVim as editing git commit messages.
Have you tried export EDITOR=/Applications/MacVim.app?
Or wrapping MacVim in a small script that uses open to start the app?
It works fine for me when I set my EXPORT variable to exactly that, and start a git commit. What are you using that's calling it? Have you considered setting EXPORT to point to the mvim script that comes on the MacVim disk image instead?
<plug>
My launch tool is designed for this. It's like Apple's open, but allows you to get the path to an application bundle rather than launching it. For example:
% launch -ni com.apple.safari
/Applications/Safari.app
launch is in Fink and MacPorts too.
</plug>