# ./findd
Hard Links Files-> 65379 /root/test2/test2/test3/c
Hard Links Files-> 65379 /root/test2/test2/test3/b
Hard Links Files-> 65384 /root/test2/test2/test3/test4/e1
Hard Links Files-> 65384 /root/test2/test2/test3/test4/f1
Hard Links Files-> 65384 /root/test2/test2/test3/test4/a1
Code:
# cat findd
#!/bin/bash
i=0
find `pwd` -name "*" -type f -exec ls -i {} \; >> findfiles
while read file
do
array[i]=$file
((i++))
done<findfiles
rm -f findfiles
count=${#array[@]}
in=0 ; inx=0
while [ $(( count -=1 )) -gt -1 ]
do
var=0
for val in "${array[@]}"
do
valinode=`echo $val|awk '{print $1}'`
array[inode]=`echo ${array[in]}|awk '{print $1}'`
if [[ "$valinode" == "${array[inode]}" ]] ; then
((var++))
fi
done
if [ $var -gt 1 ] ; then
myval[inx]=${array[in]}
fi
((++in))
((++inx))
done
for val1 in "${myval[@]}"
do
echo "Hard Links Files->" $val1
done
Hi all!
I'd like to know the differences between hard links and soft links. I've already read the ln manpage, but i'm not quite sure of what i understood.
Does a hard link sort of copy the file to a new name, give it the same inode number and same rights?
What exactly should I do to do this:... (3 Replies)
Someone asked me a question today about the difference between a hard link and a soft link. That got me thinking and maybe someone can answer.
Why would I ever use a hard link if I can use a soft link instead? (2 Replies)
hello folks
how y'all doin
well i have some questions about symbolic link and hard link
hope some one answer me
i open terminal and join as root
and i wrote ln -s blah blah
then i wrote ls
i see red file called blah blah
but didn't understand what is this can some one explain and... (2 Replies)
Hello,
In unix, the normal user can't create a hardlink for a directory. why..?
Is there any difference between creating a hard link for a file and directory?
The super user can create a hard link for directories.
Why we cannot create and super user can create.?
Please, can anyone help... (1 Reply)
Hi
PLease let me know the usage of Hard Link vs Soft Link
i.e what is the basic difference and what happens when one file is changed or deleted in both the cases???
thanks (3 Replies)
Hi Experts,
Please help me out to find out difference between a hard link and a soft link.
I am new in unix plz help me with some example commands ( for creating such links).
Regards
S.Kamakshi :) (2 Replies)
Hello,
Please move this if I chose the wrong forum category. This question pertains to Unix and Linux I believe. I google the difference between hard and symbolic/soft links and I understand the difference. What I am trying to find is a real example of a hard link being used in a Operating... (11 Replies)
Is it possible to Hard link a directory? Some people on google say it is possible and some say it is not possible. I haven't seen a working solution though. (3 Replies)
How can I create a hard link to a file, then rename the hard link to a different name? (2 Replies)
Discussion started by: fhill2
2 Replies
LEARN ABOUT DEBIAN
www::mechanize::link
WWW::Mechanize::Link(3pm) User Contributed Perl Documentation WWW::Mechanize::Link(3pm)NAME
WWW::Mechanize::Link - Link object for WWW::Mechanize
SYNOPSIS
Link object to encapsulate all the stuff that Mech needs but nobody wants to deal with as an array.
Constructor
new()
my $link = WWW::Mechanize::Link->new( {
url => $url,
text => $text,
name => $name,
tag => $tag,
base => $base,
attr => $attr_href,
} );
For compatibility, this older interface is also supported:
new( $url, $text, $name, $tag, $base, $attr_href )
Creates and returns a new "WWW::Mechanize::Link" object.
Accessors
$link->url()
URL from the link
$link->text()
Text of the link
$link->name()
NAME attribute from the source tag, if any.
$link->tag()
Tag name (one of: "a", "area", "frame", "iframe" or "meta").
$link->base()
Base URL to which the links are relative.
$link->attrs()
Returns hash ref of all the attributes and attribute values in the tag.
$link->URI()
Returns the URL as a URI::URL object.
$link->url_abs()
Returns a URI::URL object for the absolute form of the string.
SEE ALSO
WWW::Mechanize and WWW::Mechanize::Image
COPYRIGHT & LICENSE
Copyright 2004-2010 Andy Lester.
This program is free software; you can redistribute it and/or modify it under the terms of either:
o the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version,
or
o the Artistic License version 2.0.
perl v5.14.2 2011-08-05 WWW::Mechanize::Link(3pm)