Sponsored Content
Full Discussion: hard links in unix
Top Forums UNIX for Dummies Questions & Answers hard links in unix Post 302343268 by jpriyank on Wednesday 12th of August 2009 04:53:17 AM
Old 08-12-2009
hard links in unix

hi
i have a hardlink how can i find the source of it
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

links: (soft, hard? symbolic??) inode

Hi, what is link? and soft link? how about hard one and symbolic link. and inode. i get confuse about this links. could anyone help me with full explainsion? thks Gusla (5 Replies)
Discussion started by: gusla
5 Replies

2. UNIX for Dummies Questions & Answers

links.... soft or hard.. not sure?

hi, i am in a directory, have 2 files as below then do a ls -l gives the below lrwxrwxrwx 1 root system 23 Mar 08 2001 filea -> /adir/filea lrwxrwxrwx 1 root system 23 Mar 08 2001 filea -> /adir/fileb now, when i do a cd /adir, the system said, adir not... (5 Replies)
Discussion started by: yls177
5 Replies

3. UNIX for Dummies Questions & Answers

Deleting Symbolic and/or Hard links

From what I understand a symbolic link is alot like a shortcut where it points to another file. if the original file is deleted the symbolic link is rendered useless but a symbolic link can be deleted without any problem. A hard link is like a copy of the file itself but pointing to the same... (3 Replies)
Discussion started by: cue
3 Replies

4. UNIX for Advanced & Expert Users

Hard links for directories.

Hard links for directories are not permitted by default. But in some flavor of Unix, super user can create hard links for directories by some other way? Is that true? Is it possible in latest version of BSD or other unix? (2 Replies)
Discussion started by: bbala
2 Replies

5. Shell Programming and Scripting

Unable to preserve hard links. Why?

Hi, I'm trying to create a Makefile that would automate remastering Knoppix distribution. As a part of the process I am mounting using linux cloop device a compressed filesystem and copy the content out of it to separate dir. However during that process I need to preserve hard links and it... (9 Replies)
Discussion started by: dpc.ucore.info
9 Replies

6. Shell Programming and Scripting

Hard Links Help

Ksh newbie here, so please bear with me. I'm currently writing a script that searches through a directory and displays files with multiple hard links. The way I have it set up, is that it displays the i-node number and then each of the link names. In addition to this, I need to know if there... (7 Replies)
Discussion started by: Unknown50862
7 Replies

7. Solaris

Hard Links and Soft or Sym links

When loooking at files in a directory using ls, how can I tell if I have a hard link or soft link? (11 Replies)
Discussion started by: Harleyrci
11 Replies

8. AIX

List all the soft links and hard links

Hi I'm logged in as root in an aix box Which command will list all the soft links and hard links present in the server ? (2 Replies)
Discussion started by: newtoaixos
2 Replies

9. UNIX for Dummies Questions & Answers

Simple example for soft and hard links

Hai, give me a simple example for soft and hard links. this will work for soft link ?? ln -s (2 Replies)
Discussion started by: Ramesh M
2 Replies

10. Shell Programming and Scripting

Timestamp change for hard and soft links

Hi team, i am writing a purge script to delete softlinks and hardlinks on linux system which are 3/10/30 days old. To test the script i need to create links with old timestamp, i am able to cange timestamp for files but not for links. i tried touch -h option but this option is not available on... (1 Reply)
Discussion started by: Satyak
1 Replies
EIO_LINK(3)								 1							       EIO_LINK(3)

eio_link - Create a hardlink for file

SYNOPSIS
resource eio_link (string $path, string $new_path, [int $pri = EIO_PRI_DEFAULT], [callable $callback = NULL], [mixed $data = NULL]) DESCRIPTION
eio_link(3) creates a hardlink $new_path for a file specified by $path. PARAMETERS
o $path - Source file path. o $new_path - Target file path. o $pri -The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. If NULL passed, $pri internally is set to EIO_PRI_DEFAULT. o $callback -$callback function is called when the request is done. It should match the following prototype: void callback(mixed $data, int $result[, resource $req]); o $data -is custom data passed to the request. o $result -request-specific result value; basically, the value returned by corresponding system call. o $req -is optional request resource which can be used with functions like eio_get_last_error(3) o $data - Arbitrary variable passed to $callback. RETURN VALUES
EXAMPLES
Example #1 eio_link(3) example <?php $filename = dirname(__FILE__)."/symlink.dat"; touch($filename); $link = dirname(__FILE__)."/symlink.link"; $hardlink = dirname(__FILE__)."/hardlink.link"; function my_hardlink_cb($data, $result) { global $link, $filename; var_dump(file_exists($data) && !is_link($data)); @unlink($data); eio_symlink($filename, $link, EIO_PRI_DEFAULT, "my_symlink_cb", $link); } function my_symlink_cb($data, $result) { global $link, $filename; var_dump(file_exists($data) && is_link($data)); if (!eio_readlink($data, EIO_PRI_DEFAULT, "my_readlink_cb", NULL)) { @unlink($link); @unlink($filename); } } function my_readlink_cb($data, $result) { global $filename, $link; var_dump($result); @unlink($link); @unlink($filename); } eio_link($filename, $hardlink, EIO_PRI_DEFAULT, "my_hardlink_cb", $hardlink); eio_event_loop(); ?> The above example will output something similar to: bool(true) bool(true) string(%d) "%ssymlink.dat" SEE ALSO eio_symlink. PHP Documentation Group EIO_LINK(3)
All times are GMT -4. The time now is 08:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy