JP Vossen on 23 Nov 2010 19:17:04 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Unix/Windows tip: Piping and command line re-direction...


Date: Tue, 23 Nov 2010 09:27:30 -0500
From: Fred Stluka<fred@bristle.com>

[...]
- The Help System (apropos, whatis, man, info, whereis, which,
   where, find, locate)

If you use bash, don't forget 'help' which gives you help on internal bash commands. I suspect other shells are similar.

For example, 'man cd' will either give you the entire bash man page (not helpful in this case) or "No manual entry for cd."

But...

$ help cd
cd: cd [-L|-P] [dir]
    Change the shell working directory.

    Change the current directory to DIR.  The default DIR is the value
    of the HOME shell variable.

    The variable CDPATH defines the search path for the directory
    containing DIR.  Alternative directory names in CDPATH are
    separated by a colon (:).
    A null directory name is the same as the current directory.  If DIR
    begins with a slash (/), then CDPATH is not used.

    If the directory is not found, and the shell option `cdable_vars'
    is set, the word is assumed to be  a variable name.  If that
    variable has a value, its value is used for DIR.

    Options:
        -L	force symbolic links to be followed
        -P	use the physical directory structure without following
                symbolic links

    The default is to follow symbolic links, as if `-L' were specified.

    Exit Status:
    Returns 0 if the directory is changed; non-zero otherwise.

--- end ---

Later,
JP
----------------------------|:::======|-------------------------------
JP Vossen, CISSP            |:::======|      http://bashcookbook.com/
My Account, My Opinions     |=========|      http://www.jpsdomain.org/
----------------------------|=========|-------------------------------
"Microsoft Tax" = the additional hardware & yearly fees for the add-on
software required to protect Windows from its own poorly designed and
implemented self, while the overhead incidentally flattens Moore's Law.
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug