"." and ".." files in Unix.


Recommended Posts

Chan_Un

The files "." and ".." are found in every directory in Unix. What are these files?

Link to post
Share on other sites
MG-Cloud

Same thing as in DOS/Windows :)

. references the current directory

.. references the parent directory

Link to post
Share on other sites
cpugeniusmv

example:

the directory i'm currently in is /home/cpugeniusmv

. = /home/cpugeniusmv

.. = /home

so if there is a directory called /home/otherguy, i can get there from where i am now by typing cd ../otherguy

it's useful for making scripts that deal with other files in relative directories :)

Link to post
Share on other sites
bigrlittlealex

What they said. :D

Link to post
Share on other sites
Feil

try it yourself , then you will find what they are

Link to post
Share on other sites
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.