[CentOS] mkdir this "." directory

Jake Shipton jakems at hotmail.co.uk
Tue Dec 29 17:30:07 UTC 2009


On 28/12/09 23:49, adrian kok wrote:
> Hi 
> 
> I have this . folder under tmp
> 
> 1/ How they can make it this folder?
> 
> 2/ How can I remove it?
> 
> Thank you
> 
> Send instant messages to your online friends http://uk.messenger.yahoo.com 
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
> 
> 
Your question may be amusing to some. Just take no notice of them :p

I'll give you a quick briefing though, you will find the "." in every
single directory, without it, you probably would be completely unable
to browse through directories at all.

The "." can be used as follows:

"cd ../" - This would step you to a lower directory. in other words you
would go from "/home/you/folder" to "/home/you"

This could also be used more for example to go from "/home/you/folder
/folder\ 2/" to simply the main "/" (This is the very top directory of
a drive) you could do:

"cd ../../../../" (or in this case you could cheat and just do "cd /",
but I'm just using this as an example ;-))

another use for the dots is like this:

"./configure" - Generally used when configuring make files, but this
tells the system to stay in directory in right now, and run that file.

Also could be used like this:

"sh ./shfile.sh" which pretty much does the same thing as above, only
this time your telling an application to run first, and then telling
the app to do above.

Oh and eh, do *not* delete those dots ;)

Also, you cannot create directory with just a dot. However, you could
make a directory starting with a dot.

For example ".folder" this will hide the directory from normal view
(However can still be seen given the right commands)

If you run with a gui, you'll probably have a few dotted folders in
your home dir. If so run "ls" and then "ls -a" and you'll see a few
folders magically appear. Bare in mind, if your out of ~ you will
need to pop back to it, to jump back to home dir just run "cd ~". :-)

Hope this helps :-)

-- 
Jake



More information about the CentOS mailing list