Still deeper into the dot (.) with an dive into access permissions. Study up because there's going to be a quiz.
In the previous article we saw how the hidden directory entries named .
(dot) and ..
(dot dot) tie the filesystem together. Those names are hard links that reference the actual filesystem object through the index number. A directory always has at least two names: .
and its given name. You can always reach the parent directory through the ..
entry.
Now let’s dig into how pathnames and permissions work internally. (If you’re familiar with all of this, try the quiz at the end.)
Two Paths to the Same Place
Pathnames can confuse users, but they’re actually simple when you see how they work. A pathname gives the location of an object (a file, a directory, a socket, etc.) in the filesystem. There are two kinds of pathname: absolute (or full) and relative:
- An absolute pathname starts at the root directory (the top of the filesystem). It always starts with a
/
(slash). Example: /home/jpeek/foo
- A relative pathname starts at the current directory. It never starts with a slash. Example: if your current directory is
/home/jpeek
, two relative pathnames you might type are: foo
and ../someuser
No matter what your current directory is, you can always find an object through its absolute pathname. But a relative pathname is often shorter.
Following a Path
When you give a pathname to a program, how does it find the object you specified? For an absolute pathname, it reads the root directory and follows the path from there. Otherwise, the program opens the current directory and follows the path from there.
Figure 1 shows how the shell’s system calls find a directory after you type cd /home/jpeek
. This figure comes from part of the filesystem tree in the previous article.

Figure 1: Finding /home/jpeek
- The pathname starts with
/
, so the system opens the root directory.
- Inside the root directory, it looks for a directory entry named home. If there’s no home entry, the pathname is invalid. Otherwise, the system opens the home directory.
- Inside the
/home
directory, it looks for a directory entry named jpeek.
Here are some more examples: multiple ways to reach the same directory. I’ll start by changing the current directory to my home directory. (A simple cd with no pathname defaults to a user’s home directory.)
1$ cd
2$ ls -ai
5423 . 58 .. 5425 bin 5424 foo
3$ ls -ai .
5423 . 58 .. 5425 bin 5424 foo
4$ ls -ai ././.
5423 . 58 .. 5425 bin 5424 foo
5$ ls -ai ../jpeek
5423 . 58 .. 5425 bin 5424 foo
6$ ls -ai /home/jpeek
5423 . 58 .. 5425 bin 5424 foo
7$ ls -ai /home/jpeek/.
5423 . 58 .. 5425 bin 5424 foo
8$ ls -ai /home/jpeek/../jpeek
5423 . 58 .. 5425 bin 5424 foo
9$ ls -ai /jpeek
ls: cannot access /jpeek: No such file or directory
Every ls command lists the same directory, some through relative pathnames and some through absolute. Command 4 opens .
, then opens .
, then opens .
again: always the same directory. Command 8 opens /home/jpeek
, then the parent directory, then the jpeek directory from there — with the same result.
Why did command 9 fail? Trace it through: open the root directory, then look for an entry named jpeek. There isn’t one.
Next: Access Permissions
Comments on "There’s a Lot in the Dot: Filesystem Permissions and Pathnames (Part 2)"
As the admin of this website is working, no question very shortly it will be famous, due to its quality contents.
Also visit my page: cheap car insurance in california
bookmarked!!, I like your blog!
My web sitte – cheap car insurance california
You’re so interesting! I do not believe I’ve read through something like
that before. So wonderful to find another person with a
few genuine thoughts on this subject. Seriously.. thanks for starting this up.
This site is one thing that is required on the internet, someone with a bit of originality!
My site Car Insurance Companies
wyoah this weblog is fantastic i like reading youhr articles.
Keep up the great work! You understand, many individuals are searching round for this information, you could help them greatly.
Look att my blog cheap car insurance in nj
This article will heelp the internet viewers for creating
new weblog orr even a weblog from start to end.
Also visit my web page; cheap car insurance in ohio
Yoou really make it seem so easy along with your presentation however I inn finding this topic to bee really something that I believe I mkght by no
means understand. It sort of ferls too complex and very wide for me.
I am looking ahead for your next put up, I’ll attempt to get thhe cling of it!
Stop by mmy website … cheap liability car insurance
Have a look at my webpage http://militarychick.com/members/alisaaiken8282
I am really thankful to the holder of this web site who
has shared this great paragraph at at this place.
My web-site; Cheap Car Insurance
Hi, after reading this remarkable post i am as well
glad to share my familiarity here with mates.
my weblog; cheap car insurance
Howdy! I’m at work browsing your blog from my
new iphone 3gs! Just wanted to say I love reading through your blog and look forward to all your posts!
Keep up the excellent work!
I was able to find good advice from your content.
I think this is a real great blog. Cool.
Thanks a lot for sharing this with alll folks you really recognize what you’re speaking approximately!
Bookmarked. Please additionally talk over wih my web ite =).
We may have a hyperlink exchange agreement among us
my site; World Chef Cheats
lenovo s1 k?l?f
The facts mentioned in the article are a few of the very best out there.
For latest information you have to pay a visit internet and on world-wide-web I found this web site as a most excellent site
for most recent updates.
The Georgia Wedding Planners introduce a free guide for
wedding plans. If you are bottom-heavy, go on reading and the content below will give some tips to help you find a favorite
cocktail gown. You will find exclusive ladies’ evening dresses
at the boutiques and designer shops selling branded apparels.
Homecoming is a very popular celebration in high schools and
colleges. And remember, some costumes Dubai were not designed to wash.
Inexpensive plus-sized evening gowns are supplied on-line regarding best excellent along with crazy cost.
It’s remarkable for me to have a site, which is useful designed
for my knowledge. thanks admin
I think this is one of the most significant information for me.
And i’m glad reading your article. But should remark on some general things, The website style is wonderful, the articles is really excellent :
D. Good job, cheers
What’s Taking place i am new to this, I stumbled upon this I have discovered It positively
useful and it has aided me out loads. I’m hoping to contribute & aid other customers like its
helped me. Good job.
%Interval training is a varying of intensities within a workout, where you add a low-intensity session with a high-intensity session.
Look at my webpage … hiit training exercises
So let’s have a simple comparison with Kobe VII
and Kobe VI. Let’s evaluate each and every query a bit more thoroughly.
It is meant to provide comfort and proper support so you can compete at the top level.
Also visit my page – cheap giuseppe zanotti shoes
I’m truly enjoying the design and layout of your website.
It’s a very easy on the eyes which makes it much more
pleasant for me to come here and visit more often. Did you hire
out a designer to create your theme? Outstanding
work!
Here is my blog post … cialis from canada pharmacy
Attractive section of content. I just stumbled upon your site and in accession capital to
assert that I acquire actually enjoyed account
your blog posts. Anyway I will be subscribing to your feeds
and even I achievement you access consistently fast.
I got this web page from my friend wwho informed me aboht this site and
now this time I am visiting this web site and reading very informative postgs aat this
time.
Also visit my blog post – Online Casino Free Bet
If you would like to get much from this post then you havce to apply such methods
to your won blog.
Feel free to visit my webpage; online Rugby Union betting site
My partner and I stumbled over here coming ffom a different web page and thought I might as well check things out.
I like what I see so now i’m following you. Loook forward to looking over your web
page again.
Feel free to surf to mmy web blog; dyson fans
Hello there, I found your web site via Google even as searching for a similar topic, your
site got here up, it appears great. I have bookmarked it in my google bookmarks.
Hello there, just turned into aware of your blog thru Google, and found that it’s truly informative.
I’m going to watch out for brussels. I’ll be grateful if
you happen to continue this in future. A lot of other people will likely be benefited from
your writing. Cheers!
Take a look at my website; dyson vacuum parts
However, I’m all your family members will want to learn more about educate consumers in excess of going to be the a property inventory isn’t.
If you want to go for a mid-priced leather bag you could try brands like Ralph Lauren or DKNY.
Many times a classic black handbag can look harsh next to bright, warm weather colors and
a neutral handbag can seem obvious.
Here is my website … prada bags outlet
Here is a good Weblog You might Find Interesting that we encourage you to visit.
We came across a cool web page that you simply might take pleasure in. Take a search in the event you want.
Here are a few of the websites we suggest for our visitors.
This web site truly has all the info I wanted concerning this subject
and didn’t know who to ask.
Hi there to all, the contents existing at this web page
are genuinely awesome for people knowledge, well, keep up the nice work fellows.
Gifts ideas for her include an array of unusual items that will appeal to the recipients.
The shoes are also available in various colours like red, blue,
brown, green, yellow, gray etc. Do not buy footwear that fit absolutely:
Most people are perfect to go with a half dimension superior than whatever they typically
use.
Also visit my website; cheap louboutin shoes
I just want to say I am beginner to blogging and really liked your web-site. Almost certainly I’m want to bookmark your blog post . You really come with excellent well written articles. Thanks for sharing your webpage.
Wonderful story, reckoned we could combine a couple of unrelated data, nonetheless definitely really worth taking a look, whoa did one understand about Mid East has got extra problerms at the same time.