# ./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 PHP
get_included_files
GET_INCLUDED_FILES(3) 1 GET_INCLUDED_FILES(3)get_included_files - Returns an array with the names of included or required filesSYNOPSIS
array get_included_files (void )
DESCRIPTION
Gets the names of all files that have been included using include(3), include_once(3), require(3) or require_once(3).
RETURN VALUES
Returns an array of the names of all files.
The script originally called is considered an "included file," so it will be listed together with the files referenced by include(3) and
family.
Files that are included or required multiple times only show up once in the returned array.
EXAMPLES
Example #1
get_included_files(3) example
<?php
// This file is abc.php
include 'test1.php';
include_once 'test2.php';
require 'test3.php';
require_once 'test4.php';
$included_files = get_included_files();
foreach ($included_files as $filename) {
echo "$filename
";
}
?>
The above example will output:
abc.php
test1.php
test2.php
test3.php
test4.php
NOTES
Note
Files included using the auto_prepend_file configuration directive are not included in the returned array.
SEE ALSO include(3), include_once(3), require(3), require_once(3), get_required_files(3).
PHP Documentation Group GET_INCLUDED_FILES(3)