O'Reilly logo

Solaris™ Operating Environment Boot Camp by Dominic Butler, David Rhodes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Shortcuts

This section looks at some more useful shortcuts that are available to users of the Korn Shell.

Home Directory

Instead of having to type in the full path of a user's home directory, you can just type a tilde (~) character followed by the user's login name:

$ cd ~jgreen
$ pwd
/export/home/jgreen
$

Previous Directory

The Korn Shell remembers which directory you where last in so you can move to it without needing to type it in. Just type “cd -”:

$ pwd
/really/long/pathname/that/I/can/never/remember
$ cd /tmp
$ pwd
/tmp
$ cd -
$ pwd
/really/long/pathname/that/I/can/never/remember
$

Aliases

The Korn Shell allows you to create shortcuts to commands. For example, the following will create an alias called ll which will run an ls -l.

 $ ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required