Creating file and directory with same name

In Linux, why can’t I create a file and a directory with same name. Seeing following error when test file exists.

$mkdir test
mkdir: cannot create directory ‘test’: File exists
$cd test
bash: cd: test: Not a directory

Source: linux

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.