Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 21 Nov 2014, 20:36
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
What's the difference between a relative & absolute Link?
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Author Message
ssreddy

Joined: 12 Jun 2013
Posts: 43
Location: Hyderabad, India

PostPosted: Fri 14 Jun 2013, 07:46    Post_subject:  What's the difference between a relative & absolute Link?  

Sorry for bothering u about this basic question.

What's the difference between a relative & absolute Link?
Back to top
View user's profile Send_private_message 
Semme

Joined: 07 Aug 2011
Posts: 4042
Location: World_Hub

PostPosted: Fri 14 Jun 2013, 07:53    Post_subject:  

Relative links are essentially shortcuts. Does this page clarify it for you?
Back to top
View user's profile Send_private_message 
ssreddy

Joined: 12 Jun 2013
Posts: 43
Location: Hyderabad, India

PostPosted: Fri 14 Jun 2013, 08:10    Post_subject:  

Semme wrote:
Relative links are essentially shortcuts. Does this page clarify it for you?


Yes, sir.

This makes things abundantly clear.

Thanks a lot.
Back to top
View user's profile Send_private_message 
Semme

Joined: 07 Aug 2011
Posts: 4042
Location: World_Hub

PostPosted: Fri 14 Jun 2013, 08:13    Post_subject:  

Good. Now let's wrap up Osmo.
Back to top
View user's profile Send_private_message 
amigo

Joined: 02 Apr 2007
Posts: 2276

PostPosted: Fri 14 Jun 2013, 09:13    Post_subject:  

Sorry, but that page is simply wrong. There are four terms that are used:
hard link
symbolic link (sometimes called soft)
relative link (actually relative path)
absolute link (actually absolute path)

hard links are hardly ever used and you must understand a bit about filesystems to know about them. symbolic links are created using the '-s' option to the 'ln' tool. When you use 'rm' on a symbolic link, the link is removed and not the object it points to.

relative and absolute refer to the *path* to the linked (real) object.
An absolute path always begins with '/' and fully describes the path to the object as viewed from the root of the filesystem '/'. A relative path describes the location of the object from the perspective of the 'current working directory'.

A relative link either starts with no '/', or starts with either './' or '../filename' (where there can any number of ../ or similar constructs)
Back to top
View user's profile Send_private_message 
Burn_IT


Joined: 12 Aug 2006
Posts: 1058
Location: Tamworth UK

PostPosted: Fri 14 Jun 2013, 10:57    Post_subject:  

Just to confirm, Amigo is perfectly correct.
_________________
I can't remember the last time I forgot something!
Back to top
View user's profile Send_private_message 
DaveS


Joined: 09 Oct 2008
Posts: 3726
Location: UK

PostPosted: Fri 14 Jun 2013, 11:35    Post_subject:  

I often wondered why there should be two options. I understand what they are, but not why they exist......
_________________
Spup Frugal HD and USB
Root forever!
Back to top
View user's profile Send_private_message 
ssreddy

Joined: 12 Jun 2013
Posts: 43
Location: Hyderabad, India

PostPosted: Fri 14 Jun 2013, 11:38    Post_subject:  

DaveS wrote:
I often wondered why there should be two options. I understand what they are, but not why they exist......


Yes, indeed!

Why not show the entire path always to make things clear?
Back to top
View user's profile Send_private_message 
Burn_IT


Joined: 12 Aug 2006
Posts: 1058
Location: Tamworth UK

PostPosted: Fri 14 Jun 2013, 12:30    Post_subject:  

For the reason you may not know the full path when you start to search.

Then having displayed the files at a particular level you would be extremely cross if you had to keep on typing all the lower levels.

_________________
I can't remember the last time I forgot something!
Back to top
View user's profile Send_private_message 
nooby

Joined: 29 Jun 2008
Posts: 10557
Location: SwedenEurope

PostPosted: Fri 14 Jun 2013, 15:55    Post_subject:  

When I drag the .mozilla over to /mnt/home/ on some puppies
that location has the name /dev-save/sda1/ or some similar to me
unusual name. I think I make them absoiute just in case it is needed
would it be better to always make them relative? I feel so lost so I ask you guys

_________________
I use Google Search on Puppy Forum
not an ideal solution though
Back to top
View user's profile Send_private_message 
Burn_IT


Joined: 12 Aug 2006
Posts: 1058
Location: Tamworth UK

PostPosted: Fri 14 Jun 2013, 17:02    Post_subject:  

I believe that in the case you just mentioned the locations are exactly the same, but have been referred to by different names.

/mnt/home is a logical name within Puppy that translates to the physical location /dev-save/sda1/.



Do you say that you are going home, or do you say I you are going to No 6. Parkfield Road, Anytown. This Country. (If that is where you lived)

_________________
I can't remember the last time I forgot something!
Back to top
View user's profile Send_private_message 
nooby

Joined: 29 Jun 2008
Posts: 10557
Location: SwedenEurope

PostPosted: Fri 14 Jun 2013, 23:30    Post_subject:  

I don't remember which puppy but one or two of them
rename /mnt/home7 that way. It is not me doing it Smile

Should I prefer the Absolute or the Relative at such times?

_________________
I use Google Search on Puppy Forum
not an ideal solution though
Back to top
View user's profile Send_private_message 
ssreddy

Joined: 12 Jun 2013
Posts: 43
Location: Hyderabad, India

PostPosted: Sat 15 Jun 2013, 01:41    Post_subject:  

Burn_IT wrote:
I believe that in the case you just mentioned the locations are exactly the same, but have been referred to by different names.

/mnt/home is a logical name within Puppy that translates to the physical location /dev-save/sda1/.



Do you say that you are going home, or do you say I you are going to No 6. Parkfield Road, Anytown. This Country. (If that is where you lived)


If we want to make a relative path for /mnt/home, can we write it as
./home? Like wise, for /mnt/home/x1/x2, will the relative path be
.../x2?
Back to top
View user's profile Send_private_message 
Burn_IT


Joined: 12 Aug 2006
Posts: 1058
Location: Tamworth UK

PostPosted: Sat 15 Jun 2013, 06:49    Post_subject:  

Introducing the dots into the location confuses the situation somewhat and can be confusing if you are not fully aware of how they work.

I've just tried looking up the rules and the best I could find is a Windows example ,but it is the same in Puppy:

Code:
Dots and dot-dots

There are two special folder names that you can use in relative paths:

One dot (.) always refers to the current folder.
Two dots (..) refers to the folder that is one level higher than the current folder.

For example:

    The relative path to a program named foo.exe in a folder two levels above the current folder is:
    ..\..\foo.exe

    The relative path to a folder named Images in a folder three levels above the current folder is:
    ..\..\..\Images

    The relative path to a file named whatsup.doc in the current folder can either be written as:
    whatsup.doc

    or as:
    .\whatsup.doc

_________________
I can't remember the last time I forgot something!
Back to top
View user's profile Send_private_message 
ssreddy

Joined: 12 Jun 2013
Posts: 43
Location: Hyderabad, India

PostPosted: Sat 15 Jun 2013, 08:36    Post_subject:  

Thanks.

But, in such a case, how to know what are the higher level folders just from dots? In other words, without knowing the hierarchy, how to know where the file is located from the path? (of course, there are other ways to find it).

I notice, In windows, they use absolute paths more often than not, don't they?
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0738s ][ Queries: 12 (0.0067s) ][ GZIP on ]