In Linux, everything is a file.
You cannot have a directory and a file of the same name (regardless of extension), just like you cannot have two files of the same name.
A directory is just a file, too.
The difference is that a directory can contain other files. It does not matter how it is called, it can have an extension (or two). What makes it a directory is that it was created as such.
A directory is one (of many) type of special file. It doesn't contain data. Instead, it contains pointers to all of the files that are contained within the directory.
source:
Comments
Post a Comment