LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-16-2009, 11:31 AM   #1
palisetty_suman
Member
 
Registered: Feb 2007
Location: TX, USA
Distribution: fedora
Posts: 191

Rep: Reputation: 33
Thumbs up files


Hey can anybody say the difference between hard link file and soft link files with example. Please don't suggest any websites. I want your knowledge because that helps me to understand better than the website. Thanks.
 
Old 02-16-2009, 11:44 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
http://www.linuxquestions.org/questi...d-link-424007/
 
Old 02-16-2009, 03:33 PM   #3
bach-fiend
LQ Newbie
 
Registered: Feb 2009
Location: St Paul, Minnesota, USA
Distribution: Redhat Fedora 10; someday planet CCRMA
Posts: 11

Rep: Reputation: 0
Let me guess: by soft link do you mean symlink, like a Windows shortcut?
A symlink only stores the pathname of a "real" file that can be on a different volume etc. If you move the file, you "break" the symlink. It now points at where the file WAS, not where you moved it to.

The other kind of link is often called a "hard link." In a classic unix filesystem, when the disk is formatted, its space is divided between a table of "inodes" and the space normally used for holding files' data. Every real file on the disk has exactly one inode. A directory basically maps a name within that directory to an inode number. If you tell the system to link x/y/z to /a/b/c, you are saying to take the same inode number as /a/b/c and put it in the directory x/y for name z.

You can only (hard) link files that are on the same filesystem.

There is no difference between a hard link and the "original" file. The directory entries both specify the inode number of the file, so you can think of the inode as the "real" name of the file.

The ls -l command tells how many hard links there are to each file. Some other option will list the inode number the filename in the directory points to.
 
Old 02-16-2009, 11:01 PM   #4
palisetty_suman
Member
 
Registered: Feb 2007
Location: TX, USA
Distribution: fedora
Posts: 191

Original Poster
Rep: Reputation: 33
Thumbs up Thanks

Thanks friends. Awesome reply. i got it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
in copy files or ls files the command want to invert select some files how to?? hocheetiong Linux - Newbie 3 06-27-2008 06:32 AM
Doom 3: Using native installer and can't locate saved game files or config files JBailey742 Linux - Games 11 08-14-2006 06:09 PM
converting a doc/ppt Windows files in html files under linux env agrosu Programming 7 02-23-2006 03:07 PM
How program to read files with extension .dat y .cfg files COMTRADE in fedora 1? ivonne Linux - Software 0 11-22-2004 11:42 AM
How to filter files in files and files which are in a sub-directory with "grep"? Piero Linux - Newbie 9 08-29-2003 02:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration