The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

Views: 1,213β€…    Votes:  2β€…
Tag : command-line  
Link: πŸ” See Original Answer on Ask Ubuntu πŸ”—

URL: https://askubuntu.com/q/889683
Title: Why are . and .. are output as a hidden files when we do ls -a?
ID: /2017/03/05/Why-are-.-and-/Why-are-.-and-..-are-output-as-a-hidden-files-when-we-do-ls-a_
Created: March 5, 2017    Edited:  March 5, 2017
Upload: November 24, 2022    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false


In MS-DOS and Windows there are also . and ... 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 . and .. as the first file system version was based on IBM PC-AT hardware.

As Serg answered in Linux . and .. 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 . and ...

⇧ How do I add up file sizes in Bash by pattern into array / list? How to set Rhythmbox default for mp3 [Not working]  β‡©