If you create another (second) inode - not a symlink (a hard link) - then it will work.
Use the ln command -this has one limitation for the new hard link : the file has to be in the same file system as the original. That usually means the same mount point with no intervening mount points. From my man page:
Be careful doing this - lots of hard links use up the inode quota for the file system. Bad things happen at that point.
Hi Jim,
No. No matter how many hard links there are to a file, that file only consumes one i-node.
If you have a bunch of symbolic links pointing to a regular file, the regular file and each symlink will consume separate i-nodes; but even if there are a 1000 hard links (i.e., 1000 different directory entries naming a single file) to a file, that file only consumes one i-node.
Note that if you use the command:
where sym is the name of an existing file of type symbolic link, the standards do not specify whether the file named link will be created as a hard link to the symbolic link sym or as a hard link to the file to which sym resolves. (The latest revision of the POSIX standard added -L and -P options to the ln utility to let the user choose the behavior they want, but most implementations haven't released updates that conform to this version of the standard yet.)
Hi general_franco,
By definition, you can't hard link files that are on different filesystems.
When asking questions like this, it always helps to know what operating system you're using.
Have you tried:
? Adding the trailing / to the pathname operand you pass to find will fail if that pathname argument doesn't resolve to a directory, but it should cause any symbolic links contained in that pathname to be resolved with or without the -L option.
These 3 Users Gave Thanks to Don Cragun For This Post:
Would I be correct in assuming that find doesn't bother recursivley searching down sim links. (It doesn't seem to so I guess it doesn't!!!) Is there anyway to make it do so? (3 Replies)
Hi,
i wan to search the file starting with Admin into the directory Output. I am running below command:
find /appl/Output -name "Admin*" -prune
but this command is going into the sub directories present under output. I do not want to search under sub directories. Any help will be highly... (6 Replies)
i have a list of files below:
rwxrwxrwx 1 pipe pipe 180 Mar 4 22:47 del_0n_Date
-rwxrwxrwx 1 pipe pipe 472 Mar 4 22:58 mail_Check
-rw-r--r-- 1 pipe pipe 92 Mar 4 22:58 minfo.txt
-rwxrwxrwx 1 pipe pipe 609 Mar 5 05:12... (6 Replies)
I am trying to copy 2 types of files so I can archive them. I tested with a set of commands:
touch -t $(date -d "-60 day" +%Y%m%d) WORKDIR/REF
find TARGETDIR/ -type f -maxdepth 1 -iname \*.out\* -or -iname \*.log\* ! -newer WORKDIR/REF -exec ls -l {} \;
This correctly lists any files in the... (2 Replies)
Hi All,
My target is to find the biggest files opened by any process and from that i have to find process id and the corresponding file also to avoid file system being hung-up.
Finding the process id: is to kill the process
Finding the biggest file: is to remove the file
To get the process... (0 Replies)
Hi gurus, greetings.
Objective: find in a path directories that are named Logs. In each found Logs dir search for files with .log extension and remove -atime +6. (Note for test/example, rm and -atime is not used).
Issue: If I execute the script without redirecting output to a file, on... (8 Replies)
Hello,
I'm having a trouble with the find cmd.
I would like to find all the java versions on my systems.
I have solaris 9 & 10 RHEL and SUSIE.
java -version
doesn't give all the versions on the server.
So I am trying to use the find command to find them all
find / -name java
I would... (7 Replies)
Hello,
I would like to create symbolic links for a series of files in my cwd (after confirming that the links don't already exist). The above files all have a similar prefix, but different extensions.
I created a shell script like shown below and I get an error message "No such file or... (4 Replies)