There are two complimentary commands for parsing a pathname:
Path Dirname Basename
one/two/three one/two three
/a/b/c /a/b c
./x/y/ ./x y
basename commands were given their names early in UNIX history, so don't rely on their having any consistent naming convention.
c are files and not directories, generally, one would say:
- File paths:
- File names:
- Directory names:
- Directory paths:
The Directory names and paths could also be given a trailing
/ to make it more obvious that they aren't files.
So in your non-UNIX (
filename.xml would be the filename and
folder1 would be the directory name.
filename.xml is a file in the