nowhere = now here!

yin-yang symbol (or "no where" if you want to confuse friends)

Tom Schneider


On a command line interface (as in Unix) one has to type a lot to get to a particular directory. On windows or a mac one has to click like crazy to get to a folder within a folder within a folder. nowhere avoids all that effort by marking directories with names you pick yourself so one can jump to them directly by their names.

The nowhere functions under Unix collectively are a powerful method for jumping around one's directories. Forget about mousing like crazy under Windows and Macs. You can even forget about Unix cd (mostly)! This is much faster!

The principle is to create a directory (~/now, in your home directory) that contains soft link pointers to places that you want to get to quickly. This is done using the nowhere csh script.

So suppose one has a directory

(Yes, you can name a directory '...'.)   Then one can go there using
cd ~/One/Two/Three/.../Infinity/
But that's a lot of work to type each time, enh? So suppose one has gotten there. Then one calls nowhere:
nowhere gamow
This creates a ~/now directory (if it did not exist before) and makes a pointer:
gamow -> ~/One/Two/Three/.../Infinity/
(That is, you will find that there is a directory named 'now' in your home directory. Use `cd;ls` to see it. Then `cd now; ls -l` to see the new link.)

Now all you need to do to get to Infinity is to type:

cd ~/now; cd gamow

Hmm. That's better but still a pain. So we bundle up the repetitive stuff. That's done using the

alias n 'cd ~/now; cd \!*;pwd'
Put this into your ~/.cshrc (or the control file for your favorite shell).

Once you start up a shell that knows about n, you can just type:

n gamow
and you will instantly jump to Infinity!

Sometimes one just wants to be able to get back to a single directory. Sure there are tricks like pushd and popd, but they only work in one shell and will be gone if you log out. So another trick is to set up a special current pointer in ~/now. nowhere calls it 'c'. Just type

and ~/now/c will automatically be set to pwd. One could get to that place with
n c
but if you set up the following alias, you can save typing a space each time you do this common operation:
alias nc 'cd ~/now/c\!*;pwd'
so all you need to type is:
to jump to the current working directory. In a multi-window system this is nice for labeling a directory and then getting another window to the same directory.

One more thing. nowhere will tell you the name of the previous link so if you wipe something out you care about you can go back and fix it. (No, there is no undonowhere [unowhere!], but now that you mention it, I'll think about writing it!)

Oh I almost forgot. There are two tools for looking into the ~/now directory. Of course one could

cd ~/now
ls -l
to list all the pointers. But which one points here, the place we are?
will tell us:
gamow -> /home/strawberry/toms/One/Two/Three/.../Infinity
(Actually it gives more information than that because it does the ls -l for gamow, but my values for it are not relevant to the discussion.)

Ok, suppose we are worried that we might already have a pointer that points somewhere else, over there, instead of here. We can find out by:

there gamow
and we will see all exact pointers named 'gamow' along with all variations that contain that string.

2004 July 23. There is a lovely trick one can use with the nowhere links. I make a link in my home directory from the name 'n' to the now directory:

% ln -s nowhere n
% lk n nowhere
% ls -l n
lrwxrwxrwx   1 toms     delila         3 May 16  2003 n -> now/
I edit text files using vim. Suppose I have a nowhere link named s that points to my script directory (which is where nowhere is kept). With the nowhere setup, I can read files from anywhere in my directory structure with a trivial command:
:r ~/n/s/nowhere
So that command reads the nowhere script into vim. What's nice is it's so short and it works for any directory that I have the link to.

Forms of nowhere use:

Sources for nowhere. All nowhere scripts are in Toms Toolkit

One Two Three...Infinity: Facts and Speculations of Science by George Gamow.

This set of tools is dedicated to Jeff Haemer, who taught me to make tools and, of course, George Gamow who understood the mathematics of the genetic code.

2003 April 21. Jeff, being the wizard he is, of course had another tool to do a similar thing. I have put the materials into the nowhere directory, where you can study the bookmarkgo program and its documentation. It worked for me under a bash shell, but it did not store successfully my ~/.book file - that remained blank.

color bar Small icon for Theory of Molecular Machines: physics,
chemistry, biology, molecular biology, evolutionary theory,
genetic engineering, sequence logos, information theory,
electrical engineering, thermodynamics, statistical
mechanics, hypersphere packing, gumball machines, Maxwell's
Daemon, limits of computers

Schneider Lab

origin: 2001 September 7
updated: 2012 Dec 12: bash! mvlk!
color bar