tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* (revisited) hard or soft links
@ 2004-04-23 15:10 Dermot Paikkos
  0 siblings, 0 replies; only message in thread
From: Dermot Paikkos @ 2004-04-23 15:10 UTC (permalink / raw)


I have had a lot of replies, thanx to; Lawrie Smith, Phil Thomas, 
Jason Orendorf, William Bochnik, Dan Riley, Bard Tesaker, David 
Smith, Martin Anderson, Bob Harris, Alan Rollow, Dan Byrd, Dr Thomas 
Blinn and BL Venkatesh.

A number of things come out of this. If you read the man pages you'll 
see that hard links can not cross filesystem. In `ls -l` the 2nd 
column show the number of links a file has to it. All directories 
have at least two links, one being . and .. While soft link can be 
identified by the l in the first character in the long listing, a 
hard link does not show itself in this way;
-rw-r--r--   2 root     system      9295 Apr 23 12:46 mylink

Many people suggested find . -links +1 or find . -type f -links +1. I 
tried these but always got a list of all files with one link or more. 
+2 seems work as expected. 

Alas I can find an easy way to find what files are actual hard links 
(and to what) which is what I have been asked for. The reason for 
this, as some asked, is because my backup software - Bakbone''s 
Netvault - is reporting that a full backup is 500+GB and I only have 
252GB available and it is not three quaters full yet. 

I tried a small backup and restore of /usr/share. du -k showed 85325 
(83MB). On tape the backup set was reported as 93MB. I restored the 
files to a different location. du -k shows the restored files as 
102268 (99MB). ls -l and du -a all report the restored files as being 
of equal size to the original. So I am gaining size but I can't see 
where. I thought that this may have been due to the backup backing up 
data twice thought hard or soft links but I know the software does 
not follow soft links.

Thanx for the help. If anyone has any ideas please let me know.
Dp.




------- Original message follows -------
Hi Managers,

My backup is reported backing up twice the amount of data that I
actually have on my files system and I am in the process of debugging
the problem with their tech-support. I have been asked to "confirm if
I have any hard links on my system". 

I am not sure how I can search for this. I know the lstat function
will report on links but I am not sure if it will tell me if a link 
is
hard or soft.

Any advice?
Dp.

------- End of Origial message -------
~~
Dermot Paikkos * dermot@sciencephoto.com
Network Administrator @ Science Photo Library
Phone: 0207 432 1100 * Fax: 0207 286 8668



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-04-23 15:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-23 15:10 (revisited) hard or soft links Dermot Paikkos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox