Skip to content

Using the mac OSX command line

The most sensible way to set up your working environment in the Mac command line when you want to do the same thing in multiple folders is to make sure you have labelled everything in the same way. A handy hint here is that if you have terminal open, and you want to simply open more tabs that are in the same space you can use:

Shell > New Tab > New Tab with Settings – Basic

Now, if you’re going to use it to create multiple tabs, it’s important to be patient between opening tabs. Otherwise you’ll find that it hasn’t ‘logged on’ correctly into the target folder you want, and you’ll find yourself with a bunch of tabs into the home directory.

Let’s say you want to run a bunch of blast searches, but first you need to do some basic formatting of your data, and move it around in the folders you have created. Using the commands from my post about blast, you can use the symbol


between each command. This is a conditional addition – so if one line fails, it’s ok. The process will stop, saving you precious processing time if you are editing more than one folder at a time (and you’ve left it for the weekend). If for some reason, you don’t care whether it finished correctly or not, you can use the symbol


In almost all cases, you are going to want to use &&. If you have any doubts about things running, you can


commands. This requires you to put in your administrator password into terminal (the same one that you use to log into your machine). This word makes your computer pretty much ignore any blocks there might be on your data being saved in any location. Only use it if you know you aren’t going to be doing anything super system altering! Otherwise you might come back, and have nothing left… Another note is that terminal will remember sudo being used for a time, so you can use it more than once in your list of commands.

Published inBioinformatics

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.