May the source be with you, but remember the KISS principle ;-)
Home Switchboard Unix Administration Red Hat TCP/IP Networks Neoliberalism Toxic Managers
(slightly skeptical) Educational society promoting "Back to basics" movement against IT overcomplexity and  bastardization of classic Unix

Norton Change Directory (NCD) clones



Recommended Links

tree KCD (linux, Solaris)




Advanced Navigation

Command history reuse in shell Command completion Regular expressions Norton Commander Etc

The Norton Utilities releases were collections of software utilities. Peter Norton published the first version for DOS, The Norton Utilities, Release 1, in 1981. Release 2 came out several years later, long with the first hard drives for the IBM PC line. Release 4 for was around 1987 and was the first in which the set of utilities became more or less stable.

Version 4 of NU was the version of NU were  Norton Change Directory (NCD) was introduced.  It was written by Brad Kingsbury. Later he recollected those early days in the following way:

I joined Peter Norton Computing in 1985, as the company’s first programmer. My previous employer had just closed its doors, so I had sent my resume to a few companies in the area. Peter responded, flew me to Seattle where he was vacationing for the summer, and hired me on the spot. Because Peter was still on vacation, I worked out of a hotel in Seattle for my first two weeks on the job. After that, I spent another six months working from the Nortons’ kitchen table. When Eileen, Peter’s wife, started cooking dinner, I knew it was time to call it a day and head home.

... My job responsibility was to develop the software, and that's what I did. I just developed the programs, and that was pretty much the last day Peter programmed.

The PNCI staff was up to five now. Peter did his writing, managing and marketing from the den of his home. The three clerical people worked upstairs...

Peter Norton has always been a laid-back person. His whole philosophy, and I've heard him quote this many times, was, "We're going to do this business stuff while it's fun.'" So that was our primary focus that first it has to be fun, and second it has to make money.

"I never knew what would happen if we didn't make any money and it was still fun. It probably wouldn't have been too fun at that point, especially for Peter,'' says Kingsbury. "But he wasn't out to create the next greatest generation of software, he wasn't out to make a whole lot of money. It was really to have fun and he enjoyed the flexibility of not having to work under someone else.''

PNCI reached $5 million in revenues in 1986. It published several other software packages but, according to Kingsbury, the Norton Utilities was still PNCI's cash cow. Utility software was gaining wider acceptance in the microcomputer industry as users realized the advantages of data recovery.

It soon was improved in the release of Norton Utilities 4.5. Peter Norton's company was sold to Symantec in 1990 and at this point Norton Utilities were doomed.  Soon NDD disappeared from the package.  Later Norton Utilities themselves disappeared from Symantec product line as they were replaced by eclectic collection of utilities company bought called Norton Systemworks. The latter included Norton AntiVirus, Norton Utilities, and a number of other utilities that expanded as Symantec purchased more utilities companies. SystemWorks continues to be a suite of utilities, but Norton Utilities is no longer available as a separate package.

The importance of Norton Change Directory (NCD) is that it inspired OFM file managers navigation paradigm. But it was important stand-alone utility in its own right.

The key idea was probably partially borrowed from Xtree (Ytree  clone for Linux is available for most linux distributions) but it was refined for quick navigation of complex directory trees and proved to be very influential:

The most common modern implementation of NCD functionality can be found in OFM managers, for example FAR.

Unfortunately none of Unix shells implements ncd functionality out of the box. In a way Unix administrators are stuck with the navigational paradigm (cd command) that definitely outlived its usefulness and is completely unsuitable for modern filesystem with their deeply nested directory structures. Therefore you need to extend it either with a utility or with a script to get this functionality.

Several implementation of varying quality exists. Shell scripts are more flexible and can be adapted to individual needs but complied versions are more powerful and sometimes (like in case of kcd -- actually a very interesting implementation with some novel ideas of its own) provide functionality close to ncd.

At one time a Unix version of Norton Utilities was developed and marketed by Interactive Systems Corp. On September 26, 1991 Sun Microsystems acquired the Intel-UNIX operating system business from ISC and the product was scrapped. In 1994 it was later relaunched as "The Almond Utilities for UNIX" by Dave Mandelkern's company AlmondSeed Software. The product was successful enough to sustain a commercial company and the company  did not last long.  As of late 2007 Dave Mandelhern is CEO of QuickHealth.   Here is the press release:

AlmondSeed Software Announces The Almond Utilities for UNIX

-- Formerly The Norton Utilities for UNIX; Provides Disk and File Management Tools --

MOUNTAIN VIEW, CA, February 14, 1994-- AlmondSeed Software, Inc. announced today the availability of The Almond Utilities for UNIX, a comprehensive suite of disk and file management tools that ease the complexity of UNIX. The product was previously marketed as The Norton Utilities for UNIX under license from Symantec Corporation, which currently provides the DOS and Macintosh versions of The Norton Utilities and is the owner of The Norton Utilities trademark. AlmondSeed announced the immediate availability of The Almond Utilities for SCO UNIX and introduced The Almond Utilities for Sun SPARC, which is scheduled for release in the second quarter of 1994.

While The Norton Utilities have gained enormous popularity among DOS, Windows and Macintosh users for their ability to rescue inadvertently or accidentally erased files and directories, this capability has been unavailable to UNIX users since Interactive Systems Corporation ceased marketing the original Norton Utilities for UNIX in early 1992. With the release of The Almond Utilities for UNIX, UNIX system users can once again recover accidentally deleted files with The Almond Utilities' file recovery tool, Almond UnRemove. In addition to its rescue features, The Almond Utilities for UNIX diagnoses hard-disk problems, manages files and replaces some of the unwieldy systems tools typical of UNIX with more user-friendly products, including:

Dave Mandelkern, president and chief executive officer of AlmondSeed Software, Inc., said, "There is a strong potential for UNIX to thrive in the world of mainstream desktop computing. By providing user-friendly, low-cost, shrink-wrapped products for end-users, AlmondSeed hopes to increase the popularity and commercial usage of UNIX on the desktop. The Norton Utilities is one of the consistently best-selling utility packages for DOS and Macintosh, and we are pleased to make similar capabilities available to today's UNIX users through The Almond Utilities."

Peter Norton, founder, Peter Norton Computing, Inc., said, "We originally developed The Norton Utilities to take the average user's fear out of disk and file management. AlmondSeed's product carries on our efforts to increase the user-friendliness of UNIX and to offer the popular tools that are familiar in the PC environment to UNIX system users."

"The Norton Utilities is the industry standard for disk and file management, and we are pleased that AlmondSeed is relaunching the UNIX version as The Almond Utilities for UNIX. Because of our cooperation with AlmondSeed, customers will now be able to have a standard set of tools that runs across all of the major computing platforms throughout their enterprise," said Ellen Taylor, Symantec's vice president and general manager of the Peter Norton Group.

Availability and Pricing

The Almond Utilities for UNIX is available now for SCO UNIX and sells for $495. System requirements are the SCO UNIX operating system, version or higher with a STREAMS driver and optional SCO Link Kit software; 386, 486 or Pentium CPU; hard disk with 6 MB free disk space; 3.5" 1.44 MB disk media. The product is packaged and documented in a style consistent with PC and Macintosh software. VAR and distributor discounts are available.

AlmondSeed Software Inc.

AlmondSeed Software, Inc. is setting the industry standard for easy-to-use, off-the-shelf UNIX software products in the sub-$500 price range. AlmondSeed products are designed to boost the productivity of end-users and increase the value of the UNIX desktop workstation to the enterprise. The privately-held company can be reached at 444 Castro Street, Suite 440, Mountain View, CA 94041. Tel: 415-968-5100, Fax: 415-969-8670.

Attempt to provide NCD functionality for Unix started long ago but none of the was very successful. I really cannot understand why as the idea was simple and brilliant. For example as recently as in April 2003 Unix Review  published a note by Ed Schaefer Shell Corner Changing Directories with ncd which compared two recent implementations:

Changing Directories with ncd

This month, Fergal Goggin submits Korn/Bash script ncd, a Unix version of the Norton change directory utility. Instead of typing in long directory paths, using regular expressions, ncd greps a file for matches. If ncd finds more than one match, the user is prompted to choose the required directory.

After Fergal describes ncd, I contrast the ncd solution with Fred Brunet's article, fcd: a Smart Change Directory (Sys Admin, November 1994), and I include my testing results.

Introducing ncd

Norton change directory was a useful utility when I was using PCs in the DOS days, but when I started using Unix, no equivalent existed so I created ncd, which:

ncd should run in both Korn and Bash shells. I normally run it in an xterm window. The scroll bar is very handy if there are loads of "hits". It should run fine in a terminal (if you choose your regular expressions carefully!).

Since cd  is called in the script, it should be dot executed. I use an alias:

alias ncd='. /home/fgoggin/scripts/ncd.bash'

Once the alias exists, enter the directory to change to:


ncd vs. fcd

Essentially, Fred Brunet's fcd script (fcd: A Smart Change Directory) shares the same goal as Fergal's ncd — build a database of full path directories, search the database, and allow the user to choose the correct directory.

Where fcd uses traditional grep to search a flat ASCII file, ncd uses zrep to search a gzip compressed file. Other "z" utilities exist for processing gzip files — zdiff, zcat, and zmore.

Don't expect the "z" utilities to function consistently across Unix variants. The Solaris 7 zcat expects the compressed file to have a "Z" extention. This means zcat only works on files created with the compress utility. Conversely, the Red Hat Linux 7.1 zcat version works on ncd's data file.

If the argument to fcd isn't exact, Brunet displays the matching directories with a sequence number and prompts the user to choose one; ncd performs the same function, but Fergal elegantly uses the select construct to generate a menu of directories to choose from.

Testing ncd

I successfully tested ncd under Solaris 7 and Red Hat Linux 7.1. In the course of my testing, I made two changes:

  1. I changed the default BASEDIR from root, /, to $HOME. I decided to test as a regular, non-root user.
  2. My Solaris 7 home directory is actually a link to another directory. For either fcd or ncd to work on a linked home directory, add the find -follow, the link option:
    find $BASEDIR -type d -follow 2> /dev/null | gzip > $NCDDATABASE

In ncd, the BOLD_TYPE and NORMAL_TYPE shell variables are hard-coded escape sequences. You could use the tput command arguments for terminal control:

BOLD_TYPE=`tput smso`
NORMAL_TYPE=`tput smso`

In conclusion, fcd/ncd's obvious weakness is that the database file rapidly obsoletes as the directory structure grows and shrinks. Consider dropping the database file periodically.

Top Visited
Past week
Past month


Old News ;-)

[Oct 14, 2018] autojump A cd command that learns - easily navigate directories from the command line

Apr 10, 2012 |

autojump is a faster way to navigate your filesystem. It works by maintaining a database of the directories you use the most from the command line.

Directories must be visited first before they can be jumped to. USAGE

j is a convenience wrapper function around autojump. Any option that can be used with autojump can be used with j and vice versa.

For more options refer to help:

autojump --help
autojump does not support directories that begin with -.
For bash users, autojump keeps track of directories by modifying $PROMPT_COMMAND. Do not overwrite $PROMPT_COMMAND:

export PROMPT_COMMAND="history -a"

Instead append to the end of the existing $PROMPT_COMMAND:


For any questions or issues please visit:

autojump was originally written by JoÃ"l Schaerer, and currently maintained by William Ting. More contributors can be found in AUTHORS. COPYRIGHT

Copyright © 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later < >. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

[Oct 14, 2018] Jump-Location - A Change Directory (CD) PowerShell Command that reads your mind by Scott Hanselman

Oct 14, 2018 |

September 18, '14

There's a lovely little utility called autojump for *nix consoles that makes the 'cd' command very smart. More that just auto-completion, it's a kind of "auto guessing." Hence, autojump. There is some beginning Windows support, but instead I turned to Tim Kellogg's open source PowerShell implementation " Jump-Location ."

What a joy.

j this and j that

First, I was like "jump-location?" I'm not going to type that. But then, of course, duh. Aliases.

Jump-Location is aliased to just j , which means I can now do awesome stuff like this:

c:\> j sc
c:\users\scott> j g
c:\users\AppData\Local\GitHub> j des

But there's more. It's actually watching how long you are in a directory and keeping stats. You can see the weighted stats with "jumpstat" and the "database" is just a text file in ~\jump-location.txt.

If "j d" isn't enough to get me into C:\GitHub\DisProject then I can do "j g d" and I'm there. It's amazing.

Installation is easy, and I hope it gets on PsGet soon for even easier installation. Just unzip, unblock, ensure that your PowerShell execution policy allows scripts, and run ./install.ps1.

NOTE : Don't run install from your desktop, or a temp folder. Put the Jump-Location folder somewhere where it will live, and it's going to add a line like this to your user profile ("C:\Users\YOU\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1") like this, so you'll want to install from a final path:

Import-Module 'C:\Users\Scott\Dropbox\utils\Jump-Location-0.5.1\Jump.Location.psd1'

I'm excited about this great little utility. Head over to and STAR it in GitHub, and give it a go! Tim, the author, is on Twitter at @kellogh . Other contributors include Sergey Vorobyev .

[Oct 14, 2018] Port of NCD (Norton Change Directory) for debian-ubuntu

Oct 14, 2018 |
Old 05-02-2017, 04:19 AM # 1
deepcore LQ Newbie
Registered: Dec 2005 Location: Denmark, Copenhagen Distribution: Ubuntu Ultimate v.6 Posts: 10
Rep: Reputation: 0
Port of NCD (Norton Change Directory) for debian/ubuntu

[ Log in to get rid of this advertisement] Does anyone know of a current port of ncd (Norton Change Directory) for Debian/Ubuntu systems? Preferably accessible through the package manager so it can easily be added to newly installed systems.

My best effords to find a similar utility has led me to:

... but as stated i would like to have it from packagemanager.

View Public Profile
View LQ Blog
View Review Entries
View HCL Entries
Find More Posts by deepcore
Old 05-02-2017, 04:48 AM # 2
pan64 LQ Guru
Registered: Mar 2012 Location: Hungary Distribution: debian/ubuntu/suse ... Posts: 11,334
Rep: Reputation: 3408 Reputation: 3408 Reputation: 3408 Reputation: 3408 Reputation: 3408 Reputation: 3408 Reputation: 3408 Reputation: 3408 Reputation: 3408 Reputation: 3408 Reputation: 3408
I don't know what do you really need, but for example zsh has a built-in cd command which has a lot of features (although a bit different).
View Public Profile
View LQ Blog
View Review Entries
View HCL Entries
Find More Posts by pan64
Old 05-02-2017, 05:26 AM # 3
michaelk Moderator
Registered: Aug 2002 Posts: 17,578
Rep: Reputation: 2312 Reputation: 2312 Reputation: 2312 Reputation: 2312 Reputation: 2312 Reputation: 2312 Reputation: 2312 Reputation: 2312 Reputation: 2312 Reputation: 2312 Reputation: 2312
What about wcd? It should be available in the debian/Ubuntu repositories.

Apparix augmenting the command-line with directory bookmarks

Apparix allows fast command-line file system navigation by bookmarking directories and jumping to a bookmark directly. The apparix command for jumping to a bookmark is called to. By default to can use both bookmarks and regular directory names and path names as targets. It is possible to jump to subdirectories of a bookmark in a single to invocation. All three modes, bookmarks, regular directories, and subdirectories of bookmarks, allow tab completion on the query string. Additionally, apparix supplies commands ae (apparix edit) and als (apparix ls) that can be used to invoke distant edit or listing commands on files and subdirectories in bookmarked locations. Finally, the portal command can be used to add all subdirectories of a given directory as locations bookmarked by their relative name. Examples:

to mcl

Change directory to the location bookmarked by mcl, say /nfs/cvs/mic/mcl/.

to mcl doc

Change directory to a subdirectory of that, /nfs/cvs/mic/mcl/doc.

to mcl doc/test

Change directory to a further subdirectory, /nfs/cvs/mic/mcl/doc/test.

to mcl <TAB> to mcl d<TAB> to mcl doc/te<TAB>

The first will generate directory completions for /nfs/cvs/mic/mcl/, the second for /nfs/cvs/mic/mcl/d, the third for /nfs/cvs/mic/mcl/doc/te.

als mcl als mcl doc

List the contents of /nfs/cvs/mic/mcl, /nfs/cvs/mic/mcl/doc, respectively. Tab completion acts as for to.

ae mcl TODO

Edit /nfs/cvs/mic/mcl/TODO. Tab completion generates all files in the target directory matching the query pattern.

ae mcl doc/TODO

Edit /nfs/cvs/mic/mcl/doc/TODO.

todo mcl todo mcl doc clog mcl

Edit /nfs/cvs/mic/mcl/TODO, /nfs/cvs/mic/mcl/TODO, /nfs/cvs/mic/mcl/ChangeLog, respectively. It depends on the user appreciation and needs whether such custom edit commands are useful or not.

The portal command is described in the apparix manual page.

News215 Jul 09

The als function (distant listing with apparix) was updated. You can now use shell expansion characters in the string optionally specified after the bookmark:

(/homes/svd) als a 'src/*.c' /homes/svd/apparix/apparix/src/apparix.c

It is necessary to quote patterns containing shell wildcards in order to prevent the current shell from trying to expand them. Find the als function here, and note that its definition is quite simple. It is easy to further customize apparix by deriving or creating your own variants of als-type bash functions.

Get apparix3




Get the most out of apparix4

Bookmark projects, use subdirectory specification as in to proj data.

For subdirectory specification use tab completion.

Use now to bookmark sudden hotspots of activity and unexpected projects. Keep all now bookmarks, they mark the occasions which put you off track and will help you find those off-track locations later.

to foo .. and to foo ../bar work and change to the parent directory and sibling directory respectively.

Use todo proj to edit the TODO file for the project bookmarked proj.

Use clog proj to edit the ChangeLog file for the project bookmarked proj.

Apparix shell functions5

Apparix can be invoked with the option --shell-examples to get basic functions for bookmarking and jumping. However, I've added a few other functions that people may find useful, and changes to these functions occur more often than changes to apparix itself. The extended set of bash functions is available here. It is recommended to name this file for example .bash_apparix in your $HOME directory and to put the line source $HOME/.bash_apparix in your $HOME/.bashrc file.

The functionality for CSH-like shells is much more limited in comparison, mainly because of its deficiencies as a scripting language, or perhaps because of my lack of ability. It is available here.

I've had requests for ZSH apparix support. If someone writes it, please let me know. The same applies to any shell, of course.


Apparix was inspired by cdargs. The HISTORY section in the manual has a few more remarks on that. The CDargs homepage lists two more cd-related applications. These are

wcd - wherever CD. This utility will scan any filesystem you throw at it. It is then possible to change/search directory by pattern and do a hundred things more. It was pointed out to me that on some Unix/Linux flavours locate does to a very large extent the same thing as wcd does - in creating a database describing file systems. Combine the locate resources with standard UNIX utilities such as grep in a small script such as goto, throw in CDargs or apparix, and your setup is small, adaptible, powerful, and uses existing resources. Still, I've tried wcd and it delivers what it promises.

kcd - k CD. Seems similar to CDargs. I've not been able to track the meaning of k. Possibly it is just the first initial of the author, Kriang Lerdsuwanakij. Hopefully it is not in the long and lamentable tradition of KDE kapplikations with klunky knames.

See also Sitaram Chamarty's bash goto functions.

Miscellaneous7cd -

takes you to the previous directory. The apparix equivalent is to - and does the same.

cd `pwd`

erases any symlink side-effects that your path may suffer from. Well, that's what I thought. I've now found a a more correct statement is pwd may erase symlink side-effects that your path suffers from.

Pattern-based cd with goto8

Sitaram Chamarty wrote a bash goto function that leverages the locate database or a user-created dump of file system locations. This is very useful for a) browsing and searching (new) file systems b) visiting locations in a hugely branched file hierarchy or when you want to range over many destinations (so that the bookmark approach is not a good fit) c) on systems where you somehow have such a minimal presence that you do not want to bother installing whatever file system navigation tools you normally use.

It is possible to ask for locations by directory name pattern and file name pattern, and it is possible to restrict matches to a specified directory that will act as root for the query.

goto can be thought of as a very convenient chimera of find and cd. It is complementary to bookmarking in that the latter provides unambiguous and instantaneous change of directory to what is presumably an oft-visited hotspot, where the mark is independent of its associated destination. goto can take you anywhere but may require zooming in by means of a selection menu, depending on the distinctiveness of the query string. The latter is used to match destinations directly.

Go to Sitaram's goto page.

[Jun 10, 2009] wcd 5.0.2

WCD is a directory changer for DOS and Unix. Another NCD (Norton Change Directory) clone. This program jumps to a (sub)directory anywhere in the directory-tree. The directory to jump to can be given by... only the first characters or an expression with wildcards

[Dec 12, 2008] Norton Change Directory TechProsaic

Does anybody else remember NCD.exe? This is a way old school command-line utility written in the mid-eighties. It built a databaose of the directories on your hard drive, then when you typed ncd <foo> it would try to get a partial match against the database. Where there were multiple matches, a little ANSI graphics box popped up and allowed you to use the cursor to select the right folder. Once the folder is selected, your working directory is changed. Very simple and to the point.

I don't know why I got to thinking about it. I used to collect utilities like this back in the DOS days but as I got into Windows that became less and less important. But now I'm always in a powershell console and I find myself missing this sort of tool. I found a very informative (if confused and rambling) webpage on the topic which brought back some old memories. There's a bunch of clones of NCD, I found one called WCD released as recently as 2006 which is available for several different shells.

Seems this sort of thing would be well within the realm of a PowerShell utility. A bit beyond my own skills perhaps, or at least my interest in learning how to write at the moment. But maybe someone else will be inspired.


bitbyte 2008-03-13 09:00:37
WCD in PowerShell: if you're wiling to use the -j option, you can use the following wcd.ps1 script:

wcdwin32 $args -GN -j | %{$_ -replace '"',"} | sl

Tips of the Trade by Carla Schroder

It's not clear if aliases and symbolic links are worse then storage of favorites in some file and using special program. At least they are simpler.
This week's "Cool Tool" is CDargs, a browser and bookmark utility for all of you Unix command-line commandos. CDargs is an extension to the cd, or "change directory" command, that lets you quickly navigate to the farthest corners of your filesystem. As the author says, CDargs is for "... when even the almighty and wonderful tab-completion is too much typing." (And CDargs also supports tab-completion.)

To get started, first reference the path to examples/ in your ~/.bashrc:

source /usr/share/doc/cdargs/examples/

Then, open the CDargs browser:

$ cdargs
[.       ]  /home/carla
 0 [1writin-g]  /home/carla/1writing
 1 [Desktop ]  /home/carla/Desktop
 2 [Mail    ]  /home/carla/Mail
 3 [Maildir ]  /home/carla/Maildir
 4 [archive ]  /home/carla/archive
 5 [bin     ]  /home/carla/bin

Navigate with the arrow keys, and hit return to select. Toggle using the tab key to switch between Browse and List modes. List mode contains your own custom bookmarks, which you create in a plain text file, or by using CDarg's built-in commands.

CDargs also works with the tcsh shell. It is released under the GPL, so anyone who wishes to adapt it for other shells can go for it. Read all about it at the CDargs home page.

Tellumar Kampiva CDargs

It's not clear if aliases and symbolic links are worse then storage of favorites in some file and using special program. At least they are simpler.
The code is really bad, I know that. It was written during that phase when you start learning C++ after coding in C for quite a while... This is just another reason for never touching it again (unless, of course, I receive fixes for bugs not detected yet.)

I'd like to include some ZSH-code for completion into the distribution but I don't use ZSH and thus I won't write it.


Current Version: 1.35

CDargs heavily enhances the navigation of the common unix file-system inside the shell. It plugs into the shell built-in cd-command (via a shell function or an alias) and thus adds bookmarks and a browser to it. It enables you to move to a very distant place in the file-system with just a few keystrokes. This is the kind of thing that power shell users invent when even the almighty and wonderful TAB-completion is too much typing. (Just as a side-note: there exists TAB-completion for cdargs ;-)

This little piece of software was inspired by an article Michael Schilli wrote for the German iX-Magazine]. There he showed a script which let you choose from a list of alternatives were to cd to, e.g. in your xterm. In the forum connected to this article some others enhanced this script.

When I wanted to change it even more and put some more features in it I discovered that it was not under the GPL so I decided to do a complete rewrite of the whole thing. Since I wanted to make sure that I shared no code with the original artwork I chose to use C/C++ together with the ncurses library. This program is the result of those efforts.


were heavily involved in this project. Please read the THANKS file in the distribution for a full list of contributors. It's amazing that such a small program can have so many people helping it.

[Sep 27, 2007] Project details for Closebracket

This is essentially reinvention and re-implementation of OFM context sensitive linkage of extension to commands (via ext file) with he additional twist that if there is no extension file type (for example as discovered by file) is used.

Closebracket lets you define multiple shell actions in a single command to speed up the typing of the most repetitive shell commands. It includes ']' and '][' commands, which are located near the "Enter" key and are easy to type quickly. They invoke primary and secondary actions respectively.

wcd 3.1.6

Sep 29, 2005 OS: MS-DOS/Windows 3.1/95/98/ME/NT/2000 License: Freeware

N/A Wcd is a program to change directory fast (another Norton Change Directory clone). It saves time typing at the keyboard. One needs to type only a part of a directory name and wcd will jump to it. Wcd has a fast selection method in case of multiple matches and allows aliasing and banning of directories. Wcd also includes a full-screen interactive directory browser with speed search. Features:

Phil Braham

this not NCD variant but attempt to reimplement and enhance pushd/popd functionality.


Bash scripts A replacement for cd. Keeps unlimited history, setup special directories for quick access

cdll allows easy moving about between directories. When changing to a new directory the current one is automatically put onto a stack. By default 50 entries are kept but this is configurable. Special directories can be kept for easy access - by default up to 10 but this is configurable. The most recent stack entries and the special entries can be easily viewed.

The directory stack and special entries can be saved to, and loaded from, a file. This allows them to be set up on login, saved before logging out or changed when moving project to project.

In addition, cdll provides a flexible command prompt facility that allows, for example, a directory name in colour that is truncated from the left if it gets too long.

History of visited directories in BASH LG #109

Do you realize how many times you type cd per day? Do you realize how many times you retype the same directory names again and again? Ever since I migrated from 4DOS/NT shell on Windows to using Bash on Unix platforms, I've missed its cd history access. In 4DOS/NT the history of the visited directories can be navigated by Ctrl+PgUp/Dn. Every time you go to a new directory by cd, its name automatically goes on top of an easily accessible history list.

In Bash, cd - switches between the last two directories. This is a function in the right direction but many times I wanted to go to the directory before the last, I dreamed of something like cd -2.

A little scripting creates some sanity in the directory navigation of Bash.

Installing the CD history function

To install the modified CD function, copy to any directory in your $PATH, or even your home directory. At the end of your .bashrc add source Restart your bash session and then type cd --.

lotzmana@safe$ cd --
0  ~

Type cd -- to verify if the installation works. Above you may see the result 0 ~. This shows that you have one directory in your history.

lotzmana@safe$ cd work
lotzmana@safe$ cd scripts
lotzmana@safe$ pwd
lotzmana@safe$ cd --
 0  ~/work/scripts
 1  ~/work
 2  ~
lotzmana@safe$ cd -2
lotzmana@safe$ pwd

The cd command works as usual. The new feature is the history of the last 10 directories and the cd command expanded to display and access it. cd -- (or simply pressing ctrl+w) shows the history. In front of every directory name you see a number. cd -num with the number you want jumps to the corresponding directory from the history.

How CD with history works

lotzmana@safe$ nl -w2 -s' '
 1 # do "."
 2 # acd_func 1.0.5, 10-nov-2004
 3 # petar marinov, http:/, this is public domain

 4 cd_func ()
 5 {
 6   local x2 the_new_dir adir index
 7   local -i cnt

 8   if [[ $1 ==  "--" ]]; then
 9     dirs -v
10     return 0
11   fi

12   the_new_dir=$1
13   [[ -z $1 ]] && the_new_dir=$HOME

14   if [[ ${the_new_dir:0:1} == '-' ]]; then
15     #
16     # Extract dir N from dirs
17     index=${the_new_dir:1}
18     [[ -z $index ]] && index=1
19     adir=$(dirs +$index)
20     [[ -z $adir ]] && return 1
21     the_new_dir=$adir
22   fi

23   #
24   # '~' has to be substituted by ${HOME}
25   [[ ${the_new_dir:0:1} == '~' ]] && the_new_dir="${HOME}${the_new_dir:1}"

26   #
27   # Now change to the new dir and add to the top of the stack
28   pushd "${the_new_dir}" > /dev/null
29   [[ $? -ne 0 ]] && return 1
30   the_new_dir=$(pwd)

31   #
32   # Trim down everything beyond 11th entry
33   popd -n +11 2>/dev/null 1>/dev/null

34   #
35   # Remove any other occurence of this dir, skipping the top of the stack
36   for ((cnt=1; cnt <= 10; cnt++)); do
37     x2=$(dirs +${cnt} 2>/dev/null)
38     [[ $? -ne 0 ]] && return 0
39     [[ ${x2:0:1} == '~' ]] && x2="${HOME}${x2:1}"
40     if [[ "${x2}" == "${the_new_dir}" ]]; then
41       popd -n +$cnt 2>/dev/null 1>/dev/null
42       cnt=cnt-1
43     fi
44   done

45   return 0
46 }

47 alias cd=cd_func

48 if [[ $BASH_VERSION > "2.05a" ]]; then
49   # ctrl+w shows the menu
50   bind -x "\"\C-w\":cd_func -- ;"
51 fi

4-7: cd_func() is a function, variables are declared local and are automatically deleted at the end of the function

8-11: if the function is called with a parameter "--" then it dumps the current content of the directory history. It is stored in the same place pushd/popd keep names -- the directory stack. Storage is the same, access is different.

12-13: Argument $1 is transferred into $the_new_dir for some post-processing. Immediately after that, if there are no parameters we assume that user asked for his home directory.

14-22: If parameter begins with '-' then the user is attempting to access one of the names in the history list. $index gets the number of the directory, then we extract the corresponding name into $adir. For example, dirs +3 dumps directory #3 from the stack.

At this point in $the_new_dir we have either a name specified explicitly as a parameter or a name obtained from the history of previously visited directories.

23-25: If a directory name begins with '~' then this character has to be replaced by the actual home directory name.

26-30: pushd does the actual 'cd'. It also puts the name on top of the directory stack. stdout is redirected to /dev/null in order to completely imitate how 'cd' works. Notice that any output to stderr, for example a message telling that the directory specified by the user doesn't exist will show up, which is again similar to what 'cd' does. The function aborts if pushd fails. We also need the new directory name for further analysis and $the_new_dir carries it down the function.

31-33: Keeping track of more than 10 directories is unproductive. Since we have just pushed one on top of the stack, we trim off any that fall below 11 names deep.

34-44: We loop through all the names in the directory stack. Any name that matches the new current directory is eliminated. Again, we have to translate any name from the list which begins with '~' to its format of fully expanded home directory.

47: We assign cd to be cd_func().

48-51: If the bash version allows for macros to be assigned we make ctrl+w summon the history of visited directories.

This script defines a function. It must be sourced and not executed, so that cd_func() is parsed and stored in the current environment. Try env and you must see it after all environment variables.

Documentation page of the script

Visit the man page.

For comments on this article please visit or join zepp mailing list.
The text of this page is public domain.

[Mar 27, 2003] Accelerator for Changing Directory

An interesting idea of first letter abbreviations. Implementation can be better, but idea is sound.

Since I moved to Win XP my old and trusted companion for easily jumping between different spots in the directory tree, NCD (Norton Change Directory) has ceased to work.

NCD worked by building a database and by using NCD to make and remove directories, the database could be kept in sync, well almost anyway.

If the directory you wanted to go to had a unique name all you had to type was NCD dir_name but if it was a common name like test you might have had to recall the commandline one or more times to get to the destination.

Another approach would be to note that if you consider part of or the whole branch, from root to the destination, the situation will be less ambigous or even unique Using that idea I came up with this simple solution which IMHO works quite well. The user interface may be rendered idiosyncratic by some, but I welcome you to suggest improvements. The documentation is nothing fancy just a few examples included in the code. The program is tested under Win XP, but I think it could work on other OS's with some minor tweaks. PS. As directory delimiter "\", "/" or even "," can be used. The comma is due to laziness, because on the Swedish keyboard one has to use Shift or Alt Gr key to get slashes!!

So instead of typing
cd "C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\Machin eKeys"
at the DOS prompt, typing the more dense command of
a ,d,a,a,m,c,r,m
will suffice. Or even horrors a ,d,,,,,r,m ;-), but that one is tougher on the filesystem.

@perl -Swx %0 %*
@goto :eof

# Utility for quickly changing directory
# Named to "a.bat" in homage to Pr1mOS's change working directory comm
+and *a* (attach) ;-]
# Syntax: 
#   a ,wi,ja,pa ===> cd \Windows\java\Packages
#   a ...\me    ===> cd \Windows\Media
#   a           ===> cd \Windows\Media\Microsoft Office 2000 *OR* a se
+lection of subdirectories
#   a /         ===> cd \
#   a mys,d,*
#   [a] /mysql/data/mysql/
#   [b] /mysql/data/tast/
#   [c] /mysql/data/test/
#   [d] /mysql/Docs/Flags/
#   select:
# if ambigous the correct target is selected with alpha keys /a .. zz/

# Versions:
# 0.2 2003-02-22 Cleanup
# 0.1 2003-01-31 First working
# 0.0 2003-01-15 Start of Coding

use strict;
use warnings;

use Cwd;

my $DEBUG = 0;
my $DELIM = qr{,|\\|\/};  ## Either "," or "/" or \" 
my @to = @ARGV ? split(/$DELIM/, $ARGV[0] ) : ();

my @cwd = split(/$DELIM/, cwd);
shift @cwd;  # Remove disk

unless ( @ARGV ) {
    push @to, @cwd, '*';
elsif ( $ARGV[0] =~ /^$DELIM/ and not @to ){ 
elsif ( $to[0] eq '' ) {
    shift @to;
else {
    unshift @to, @cwd;

## Lazy-dots
foreach my $part (0 .. $#to) {
    if ( $to[$part] =~ /\.(\.+)/ ) {
        $to[$part] = join('/',  ('..') x length($1));

@to = split(/\//, join('/', @to));

## Rel2Abs
my @fixed;
for (@to) {
    if ($_ eq '..') {
        pop @fixed if @fixed;
    } elsif($_ eq '.') {
        ## Skip
    } else {
        push @fixed, $_

my @choices = expand('/', @fixed);

my %hash;
my $enum = 'a';
my $choice = '';
if (1 == @choices) {    # Autoselect if only one item to choose
    $hash{a} = $choices[0];
    $choice = $enum;
} elsif(1 < @choices) {
    foreach my $c (@choices) {
        ($hash{$enum} = $c) ;
        print '[', $enum++, "] $c\n";
    print "select: ";
    $choice = <STDIN>;
    chomp $choice;

# Create a batch file to change the directory in the shell.
open (CD, '>', 'C:/A_CD.BAT') or die "Failed to create CD bat file $!\
if ( defined $hash{$choice} ) {
    $hash{$choice} =~ s/\//\\/g; # Make windows happy
    print CD "\@CD \"$hash{$choice}\"\n";
} else {
    print CD "\@echo No match\n";
close CD;

sub expand {
    my ($bough, @twigs) = @_;

    return $bough unless @twigs; ## Looked it up in the thesaurus ;-]
    opendir(my $dh, $bough) || die "Can not check $bough for twigs due
+ to $!\n";
    my $regexp = shift @twigs;
    $regexp =~ s/\*/.*/;
    my @found;  
    foreach my $f ( grep { $_ =~ /^$regexp/i and $_ !~ /^\./}  readdir
+($dh) ) {
        push @found, expand("$bough$f/", @twigs) if (-d "$bough$f");
    closedir($dh) || die "Bad close for $bough $!\n";
    return @found;


Ze Freeware. NCD : 'Nother Change Directory

My good old Norton Change Directory (©1988…) choked on a disc having 15 000 directories, the weakling. Then I had to do what I do every time I want something to be done well : I rewrote it myself.

No size limit, unlike ACD (boo !). I imitated the behavior of Norton CD, in particular, if you type several times "NCD TMP", NCD will trot you through all TMP directories on the hard disk in turn. You do not remain stuck on the first one.

Also, the disk is rescanned automatically if NCD is launched from a directory created since last scanning or from its parent. And of course, I added my fabulous fuzzy search as usual, quite convenient for the mistypings which are thus "forgiven" (Norton CD only goes to the directory having the longest common beginning).

On the other hand it is not optimized (for the moment) : a large file, NCD.NCD, is placed in the root of each hard disk. It will shrink in later versions.
Soon also, indexing of CD-ROMs.
Click here Size : 50 kB.

Briggs Softworks Products

Directory Maven 95 is an automated change directory program. Like the DOS version, you can quickly change to any directory on any drive from the MS-DOS command line or view the directory trees of all your drives. However, Directory Maven 95 is a 32-bit console application that supports long filenames and up to 10,000 directories per drive. This program is freeware: Try it!

Coig Change Directory v0.803a

Coig Change Directory (CCD) is a freeware DOS enhanced directory changer. It allows you to change to any directory in your drives quickly, and without typing long CD commands from the command line.

CCD can be used with arguments from the command line or by using its user-friendly graphical interface, where you can navigate through the directory tree with the cursor keys.

ncd Script

Fergal's ncd Script February 2003
# Fergal Goggin 11-April-2000, SSL
# ncd : a change directory script for UNIX. works like norton change
# 	directory on a PC. It can take regular expressions on the 
#	command line. Remove $HOME/.ncd if you want to change the 
#	database. Use env var BASEDIR to specify the top level directory 
#	in the tree (defaults to the root dir, /)
# usage: [BASEDIR=XXX] ncd        - to create, remove $HOME/.ncd first
# 	 ncd  - to search

if [ $TERM = "xterm" ]

NCDDATABASE=$HOME/.ncd.`uname -n`
if [ "$BASEDIR" = "" ] 

if [ ! -f $NCDDATABASE ]
   echo "re-creating database from $BASEDIR"
   find $BASEDIR -type d 2> /dev/null | gzip > $NCDDATABASE
elif [ $# -lt 1 ]
   echo "ncd, change directory for UNIX, fgoggin 2000"
   echo "usage: [BASEDIR=XXX] ncd "
   trap 'rm -f $NCDTMPFILE' 2
   # wc -l seems to stick a tab in front of it output 
   # so it is just as easy to use grep -c
   noLines=`grep -c ^ $NCDTMPFILE`
   if [ $noLines -eq 0 ] 
      echo "No match"
   elif [ $noLines -eq 1 ]
      # exact match
      cd `cat $NCDTMPFILE`
      # list all directories found and let the user pick one
      PS3="${INVERSE_TYPE}Pick one from the above list${NORMAL_TYPE} > "
      select directorySelected in `cat $NCDTMPFILE`
         if [ "$directorySelected" = "" ] 
            # when the user wants to break out of the 
            # display loop without changing directory. 
            case "$REPLY" 
               in "q"|"Q"|"quit"|"Quit"|"QUIT"|"E"|"e"|"X"|"x"|"exit"|"Exit"|"EXIT")
            echo "${BOLD_TYPE}not valid${NORMAL_TYPE}"
            # force list to be re-displayed
            cd $directorySelected
            # break out of select loop

Ken Silverman's Utility Page

NCD.EXE 5,592 bytes

KeN's Change Directory. If you like jumping to different directories quickly, you should try my version of the program, based on one of my favorite Norton Utilities. My NCD program is extremely small and fast. One cool feature is that it stores the entire directory tree (skips hidden directories) in the "NCD.EXE" program file itself. This keeps your HD from getting cluttered and makes the program load even faster. DOS16

Recommended Links

Google matched content

Softpanorama Recommended

Top articles



Shell Corner Changing Directories with ncd

Changing Directories with ncd

This month, Fergal Goggin submits Korn/Bash script ncd, a Unix version of the Norton change directory utility. Instead of typing in long directory paths, using regular expressions, ncd greps a file for matches. If ncd finds more than one match, the user is prompted to choose the required directory.

After Fergal describes ncd, I contrast the ncd solution with Fred Brunet's article, fcd: a Smart Change Directory (Sys Admin, November 1994), and I include my testing results.


[Nov 26, 2004] kcd Home Page

KCD is the most interesting Linux implementation of NCD functionality with some novel ideas. Actively supported. Highly recommended.

kcd is a directory change utility under Linux or any other Unix clones. It helps you navigate the directory tree. You can supply the desired directory name in the command line and let kcd find it for you or let kcd show the entire directory tree and use arrow keys to go to the destination directory.

Here is a list some features available in kcd:

kcd is available as stable version and development version. You can distinguish development version from stable version by looking at its version number. Beginning from version 5.0.0, any version x.y.z where y is even is a stable version. Those where y is odd is a development version. Features currently present in the development version will eventually appear in the future stable version 8.0.0.

kcd is distributed in source form under General Public License (GPL).

The program and this web page is maintained by Kriang Lerdsuwanakij


Erwin Waterlander, WCD Wherever Change Directory Another Norton Change Directory (NCD) clone with too many features. This is too complex variant. Not very useful in Linux/Unix environment.

Wcd is a program to change directory fast. It saves time typing at the keyboard. One needs to type only a part of a directory name and wcd will jump to it. By default wcd searches for a directory with a name that begins with what has been typed, but the use of wildcards is also fully supported.
For instance:

wcd Desk

will change to directory /home/waterlan/Desktop

But also

wcd *top

will do that.

Wcd is free to use and you can get the source code too.

Some features of wcd:

  • Full screen interactive directory browser with speed search.
  • Present the user a list in case of multiple matches.
  • Wildcards *, ? and [SET] supported.
  • Directory stack, push pop.
  • Subdir definition possible. E.g. wcd subdira/subdirb
  • Long directory names support in Win95/98/NT DOS-box
  • Windows LAN UNC paths supported.
  • Change drive and directory at once.
  • Alias directories.
  • Ban directories.
  • 'cd' behaviour
  • Free portable source-code, no special libraries required
  • Multi platform:
    DOS 16 bit, DOS 32 bit, DOS bash, Windows 3.1/95/NT DOS-box, Cygwin bash, Unix ksh, csh, bash and zsh.
  • Wcd has been tested on: FreeDOS, MS-DOS 6.2, Win95, Win98, Windows NT 4.0, Linux, FreeBSD, HP-UX, SunOS, Solaris, SGI IRIX. Wcd works on any PC and can be ported to any Unix system.

    WCD is free software, distributed under GNU General Public License.



    Groupthink : Two Party System as Polyarchy : Corruption of Regulators : Bureaucracies : Understanding Micromanagers and Control Freaks : Toxic Managers :   Harvard Mafia : Diplomatic Communication : Surviving a Bad Performance Review : Insufficient Retirement Funds as Immanent Problem of Neoliberal Regime : PseudoScience : Who Rules America : Neoliberalism  : The Iron Law of Oligarchy : Libertarian Philosophy


    War and Peace : Skeptical Finance : John Kenneth Galbraith :Talleyrand : Oscar Wilde : Otto Von Bismarck : Keynes : George Carlin : Skeptics : Propaganda  : SE quotes : Language Design and Programming Quotes : Random IT-related quotesSomerset Maugham : Marcus Aurelius : Kurt Vonnegut : Eric Hoffer : Winston Churchill : Napoleon Bonaparte : Ambrose BierceBernard Shaw : Mark Twain Quotes


    Vol 25, No.12 (December, 2013) Rational Fools vs. Efficient Crooks The efficient markets hypothesis : Political Skeptic Bulletin, 2013 : Unemployment Bulletin, 2010 :  Vol 23, No.10 (October, 2011) An observation about corporate security departments : Slightly Skeptical Euromaydan Chronicles, June 2014 : Greenspan legacy bulletin, 2008 : Vol 25, No.10 (October, 2013) Cryptolocker Trojan (Win32/Crilock.A) : Vol 25, No.08 (August, 2013) Cloud providers as intelligence collection hubs : Financial Humor Bulletin, 2010 : Inequality Bulletin, 2009 : Financial Humor Bulletin, 2008 : Copyleft Problems Bulletin, 2004 : Financial Humor Bulletin, 2011 : Energy Bulletin, 2010 : Malware Protection Bulletin, 2010 : Vol 26, No.1 (January, 2013) Object-Oriented Cult : Political Skeptic Bulletin, 2011 : Vol 23, No.11 (November, 2011) Softpanorama classification of sysadmin horror stories : Vol 25, No.05 (May, 2013) Corporate bullshit as a communication method  : Vol 25, No.06 (June, 2013) A Note on the Relationship of Brooks Law and Conway Law


    Fifty glorious years (1950-2000): the triumph of the US computer engineering : Donald Knuth : TAoCP and its Influence of Computer Science : Richard Stallman : Linus Torvalds  : Larry Wall  : John K. Ousterhout : CTSS : Multix OS Unix History : Unix shell history : VI editor : History of pipes concept : Solaris : MS DOSProgramming Languages History : PL/1 : Simula 67 : C : History of GCC developmentScripting Languages : Perl history   : OS History : Mail : DNS : SSH : CPU Instruction Sets : SPARC systems 1987-2006 : Norton Commander : Norton Utilities : Norton Ghost : Frontpage history : Malware Defense History : GNU Screen : OSS early history

    Classic books:

    The Peter Principle : Parkinson Law : 1984 : The Mythical Man-MonthHow to Solve It by George Polya : The Art of Computer Programming : The Elements of Programming Style : The Unix Hater’s Handbook : The Jargon file : The True Believer : Programming Pearls : The Good Soldier Svejk : The Power Elite

    Most popular humor pages:

    Manifest of the Softpanorama IT Slacker Society : Ten Commandments of the IT Slackers Society : Computer Humor Collection : BSD Logo Story : The Cuckoo's Egg : IT Slang : C++ Humor : ARE YOU A BBS ADDICT? : The Perl Purity Test : Object oriented programmers of all nations : Financial Humor : Financial Humor Bulletin, 2008 : Financial Humor Bulletin, 2010 : The Most Comprehensive Collection of Editor-related Humor : Programming Language Humor : Goldman Sachs related humor : Greenspan humor : C Humor : Scripting Humor : Real Programmers Humor : Web Humor : GPL-related Humor : OFM Humor : Politically Incorrect Humor : IDS Humor : "Linux Sucks" Humor : Russian Musical Humor : Best Russian Programmer Humor : Microsoft plans to buy Catholic Church : Richard Stallman Related Humor : Admin Humor : Perl-related Humor : Linus Torvalds Related humor : PseudoScience Related Humor : Networking Humor : Shell Humor : Financial Humor Bulletin, 2011 : Financial Humor Bulletin, 2012 : Financial Humor Bulletin, 2013 : Java Humor : Software Engineering Humor : Sun Solaris Related Humor : Education Humor : IBM Humor : Assembler-related Humor : VIM Humor : Computer Viruses Humor : Bright tomorrow is rescheduled to a day after tomorrow : Classic Computer Humor

    The Last but not Least Technology is dominated by two types of people: those who understand what they do not manage and those who manage what they do not understand ~Archibald Putt. Ph.D

    Copyright © 1996-2021 by Softpanorama Society. was initially created as a service to the (now defunct) UN Sustainable Development Networking Programme (SDNP) without any remuneration. This document is an industrial compilation designed and created exclusively for educational use and is distributed under the Softpanorama Content License. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

    FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available to advance understanding of computer science, IT technology, economic, scientific, and social issues. We believe this constitutes a 'fair use' of any such copyrighted material as provided by section 107 of the US Copyright Law according to which such material can be distributed without profit exclusively for research and educational purposes.

    This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language. Grammar and spelling errors should be expected. The site contain some broken links as it develops like a living tree...

    You can use PayPal to to buy a cup of coffee for authors of this site


    The statements, views and opinions presented on this web page are those of the author (or referenced source) and are not endorsed by, nor do they necessarily reflect, the opinions of the Softpanorama society. We do not warrant the correctness of the information provided or its fitness for any purpose. The site uses AdSense so you need to be aware of Google privacy policy. You you do not want to be tracked by Google please disable Javascript for this site. This site is perfectly usable without Javascript.

    Last modified: October 15, 2018