🔍 See Original Answer on Ask Ubuntu ⧉ 🔗
Why are . and .. are output as a hidden files when we do ls -a?
March 5, 2017
Edited: March 5, 2017
September 20, 2023
Copy to clipboard: false
/assets/js/search.js will update text..
In MS-DOS and Windows there are also
... Quite simply
. represents the current directory and
.. represents the parent directory.
MS-DOS was born from CPM operating system when Bill Gates bought rights for $80,000 and licensed to IBM as PC-DOS which turned into MS-DOS which turned into Windows which is predicted to land him a Trillion Dollars in the end.
Linux also uses
.. as the first file system version was based on IBM PC-AT hardware.
As Serg answered in Linux
.. don’t appear in
ls command because any file beginning with
. is a hidden file. You can use the
ll alias to see these files though.
In both MS-DOS and Linux you can use
cd .. command to change to the parent directory. In Linux when you want to call a command in the current directory (not in the path) you need to prefix the command with
./. In MS-DOS however it will automatically look in the current directory for the command before searching the PATH.
Apple Mac and Google Android are based on the Linux operating system but I don’t know if their file systems also use