Increasing Productivity in Accessing Directories

Switching between long directory names can become tiresome and frustrating. The following sections give you some UNIX techniques that can help.

Setting CDPATH for Most-Accessed Directories

In the first chapter, you saw how shell variables can be set to customize how the system operates. The Bourne shell and the Korn shell have a shell variable called CDPATH to enable you to easily get to directories that you use most often, as long as they have distinctive names. After you have set up CDPATH, you can cd to the basename of your common directories as though you were always sitting in the parent directories of those directories.

Setting and Using CDPATH

1.
Make a list of the full pathnames of the ...

Get Practical UNIX now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.