z is a bash/zsh extension that tracks your most used directories, based on 'frecency'. After a short learning phase, z will take you to the most 'frecent' directory that matches ALL of the regexes given on the command line, in order. For example, z foo bar would match /foo/bar but not /bar/foo. Frecency is a portmanteau of 'recent' and 'frequency'.