|
Hopefully, this page is exactly what you are looking for, but if not, you can always find further assistance on Unix/Linux Forum!
BASENAME(1) FreeBSD General Commands Manual BASENAME(1)
NAME
basename, dirname -- return filename or directory portion of pathname
SYNOPSIS
basename string [suffix]
basename [-a] [-s suffix] string [...]
dirname string
DESCRIPTION
The basename utility deletes any prefix ending with the last slash `/'
character present in string (after first stripping trailing slashes), and
a suffix, if given. The suffix is not stripped if it is identical to the
remaining characters in string. The resulting filename is written to the
standard output. A non-existent suffix is ignored. If -a is specified,
then every argument is treated as a string as if basename were invoked
with just one argument. If -s is specified, then the suffix is taken as
its argument, and all other arguments are treated as a string.
The dirname utility deletes the filename portion, beginning with the last
slash `/' character to the end of string (after first stripping trailing
slashes), and writes the result to the standard output.
EXIT STATUS
The basename and dirname utilities exit 0 on success, and >0 if an error
occurs.
EXAMPLES
The following line sets the shell variable FOO to /usr/bin.
FOO=`dirname /usr/bin/trail`
SEE ALSO
csh(1), sh(1)
STANDARDS
The basename and dirname utilities are expected to be IEEE Std 1003.2
(``POSIX.2'') compatible.
FreeBSD 6.2 April 18, 1994 FreeBSD 6.2
Man(1) output converted with
man2html and wrapped by fishsponge
This page was generated on Wed Sep 19 19:56:21 BST 2007
|
Your favourite pages:
No pages logged yet. Trying to save cookie... Top 10 most popular pages:
sqlite3 man page (5325 hits) (openSUSE 10.2)
svn man page (5195 hits) (FreeBSD 6.2)
adv_cap_autoneg man page (4867 hits) (Solaris 10 11_06)
CPAN man page (4603 hits) (Suse Linux 10.1)
ssh man page (4340 hits) (Suse Linux 10.1)
ssh-socks5-proxy-connect man page (2857 hits) (Solaris 10 11_06)
netcat man page (2701 hits) (Suse Linux 10.1)
pprosetup man page (2480 hits) (Solaris 10 11_06)
startproc man page (2466 hits) (Suse Linux 10.1)
signal man page (2399 hits) (Suse Linux 10.1)
|