| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This section describes commands that manipulate file names.
18.1 basename: Strip directory and suffix from a file nameStrip directory and suffix from a file name. 18.2 dirname: Strip non-directory suffix from a file nameStrip non-directory suffix from a file name. 18.3 pathchk: Check file name portabilityCheck file name portability.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
basename: Strip directory and suffix from a file name
basename removes any leading directory components from
name. Synopsis:
basename name [suffix] |
If suffix is specified and is identical to the end of name,
it is removed from name as well. basename prints the
result on standard output.
The only options are `--help' and `--version'. See section 2. Common options.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
dirname: Strip non-directory suffix from a file name
dirname prints all but the final slash-delimited component of
a string (presumably a filename). Synopsis:
dirname name |
If name is a single component, dirname prints `.'
(meaning the current directory).
The only options are `--help' and `--version'. See section 2. Common options.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
pathchk: Check file name portability
pathchk checks portability of filenames. Synopsis:
pathchk [option]... name... |
For each name, pathchk prints a message if any of
these conditions is true:
The program accepts the following option. Also see 2. Common options.
0 if all specified file names passed all of the tests, 1 otherwise. |
| [ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |