OSX 10.10 Terminal. Help Needed - terminal

Dumb question in my terminal I make documents using the touch command. For example:
touch blah.pages
touch blah.numbers
The file was created, but I cant open it.
I'm curious as to why this is. Please help me!

You're probably using Pages and Numbers respectively to open these files, since that's the default.
These programs can't open Pages or Numbers files not created within them, for whatever reason.
You can open the files in another editor though, like nano for example.
Try nano blah.pages and you can edit the empty file.

Related

Ubuntu 19.10 shell script only opens from /Desktop/ directory

I have a shell script file on my Desktop, and I have my preferences set so that when I double-click it, I'll be prompted for if I want to open it for edit, or run it. This works fine when double-clicking the file in my /home/[user]/Desktop folder, but when I double-click the file on my actual Desktop, it doesn't work.
Why is this and how can I run the file from my Desktop?
There can be a number of things that could be wrong in your environment. Could you provide us with the contents of the shell script and a screenshot of your preferences? Could you also expand on what doesn't work? What is the behavior you received after you attempted to run the shell script?
There are a lot of information that was left out that is preventing a large number of our community from helping you.
You can reference the FAQ on asking a question here: https://stackoverflow.com/help/how-to-ask
P.S. Welcome to the community!

Always show file browser in TextMate 2

I've been working for a while with TextMate 2 and there's something I've never been able to solve.
Is it possible to always show the file browser at launch?
I know you can show it with ctrl+alt+cmd+D but I'd like it to always show at launch without having to make this shortcut (as I launch/quit TextMate many times in a day).
I'd be really grateful if anyone had a solution for this problem.
Thanks very much
5 months ago, I contacted Michael Sheets from MacroMates Support and here's his answer:
The file browser is shown when directories are opened or a favorite is open that is a directory. It is not shown when a single file is opened. If you want the file browser shown you should either open the directory itself or take advantage of the Favorite system.
I'm interested to. Did you already find out how to always show the file manager? Maybe it's possible through .tm_properties file?

How to make application autorun on Mac?

I want to make my application autorun, like using autorun.inf on Windows. I googled and there is one way for me to do that:
"On the Mac side there are many applications you can buy for creating a Finder window that looks a certain way but all these changes can be made within finder. You then will need to copy the DS_Store file to the CD and finder will automatically apply any changes that you have made.
Also using -hfs-openfolder will cause it to open automatically when inserted on the mac."
Can anyone tell me more clearly about that, or is there any other way?
Thanks so much.
According to this page, you should be able to do that with bless:
sudo bless --folder "/Volumes/discName" --openfolder "/Volumes/discName"
The man page confirms that, at least on 10.6.8. I don't have Lion in front of me right now.

Edit sqlite file from terminal Mac

I can not find any documents where I can open existing sqlite database file that I made from the terminal on Mac. I want to add some additional rows to the existing database. I probably search for the wrong things, so anything that points me in the right direction is much appriciated.
If you want to remain in the Terminal, you can open a sqlite3 database using the command sqlite3 [databasename]. From here, you can select rows or insert new ones using SQL commands. If you prefer a GUI, there are many to choose from, including the free Firefox plugin, sqlite-manager.
Whenever you work with Mac built-in sqlite3 it saves the files in the current folder where your Terminal is and the way you can access them is the reversed story, open sqlite3 while you are at the folder where your database is.
Find and get precompiled binaries for OSX.
Use the command line client.
I realize this is a bit tangential to the question, but it's helpful to be able to find/move hidden files in Finder, because often sqlite DBs will wind up in a hidden folder. See:
http://www.macworld.com/article/1051830/showallfinder.html
The key bit is to enter this in the Terminal, then force Finder to relaunch (via the Apple menu's Force Quit on Lion):
defaults write com.apple.Finder AppleShowAllFiles YES
Change that to NO at the end to toggle it off.

Where is ~/.config/MonoDevelop/ for MonoDevelop

I'm using Mac Snow Lepord and can't find "~/.config/MonoDevelop/" for the life of me. I have MonoDevelop (v2.2.2) up and running already, but when I tried to set up a template the IDE started having problems.
Namely, whenever I went to Monodevelop -> preferences-> Code Templates I would get an error saying "Argument cannont be null".
I tried removing MonoDevelop from my Mac and re-installing but that doesn't appear to fix this problem so I thought if I could find the above folder maybe I could remove that. However I am not sure how to find it. I put the address directly into Mac's "finder" search box and no results were returned.
Can anyone help?
Note: You are not going to see your .config directory in your user directory in finder unless you show hidden files. You are going to have to get there via bash in the Terminal.
The tidle ~ would normaly expand to your home directory, e.g. ~/foo.txt is /path/to/your_directory/foo.txt, depending on where 'home' is on any given system.
So, the file you are looking for is /Users/your_username/.config/MonoDevelop/ ...
Also, there are some shells / systems that simply do not support tidle expansion.
Since you are on a Mac, you'll actually have to go to ~/Library/Prefernces/MonoDevelop-2.x to do your install.

Resources