Sponsored Content
Full Discussion: hard links in unix
Top Forums UNIX for Dummies Questions & Answers hard links in unix Post 302343289 by zaxxon on Wednesday 12th of August 2009 05:40:20 AM
Old 08-12-2009
There is a find option called -samefile for GNU find. Read this:
Hard Links - Finding Files
and try it out. It will compare the inodes of the file you give to all other that find will stumble upon.

If you don't have that find, I would check it's Inode manually with ls -li and search the filesystem with find looking for this inode. Hardlinks can't pass filesystem boundaries so it's kinda easy/limited search.
 

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
UPDATEDB(1)                                                   General Commands Manual                                                  UPDATEDB(1)

NAME
updatedb - update a file name database SYNOPSIS
updatedb [options] DESCRIPTION
This manual page documents the GNU version of updatedb, which updates file name databases used by GNU locate. The file name databases con- tain lists of files that were in particular directory trees when the databases were last updated. The file name of the default database is determined when locate and updatedb are configured and installed. The frequency with which the databases are updated and the directories for which they contain entries depend on how often updatedb is run, and with which arguments. In networked environments, it often makes sense to build a database at the root of each filesystem, containing the entries for that filesystem. updatedb is then run for each filesystem on the fileserver where that filesystem is on a local disk, to prevent thrashing the network. Users can select which databases locate searches using an environment variable or command line option; see locate(1). Databases can not be concatenated together. The file name database format changed starting with GNU find and locate version 4.0 to allow machines with different byte orderings to share the databases. The new GNU locate can read both the old and new database formats. However, old versions of locate and find produce incorrect results if given a new-format database. OPTIONS
--findoptions='-option1 -option2...' Global options to pass on to find. The environment variable FINDOPTIONS also sets this value. Default is none. --localpaths='path1 path2...' Non-network directories to put in the database. Default is /. --netpaths='path1 path2...' Network (NFS, AFS, RFS, etc.) directories to put in the database. The environment variable NETPATHS also sets this value. Default is none. --prunepaths='path1 path2...' Directories to not put in the database, which would otherwise be. Remove any trailing slashes from the path names, otherwise updat- edb won't recognise the paths you want to omit (because it uses them as regular expression patterns). The environment variable PRUNEPATHS also sets this value. Default is /tmp /usr/tmp /var/tmp /afs. --prunefs='path...' File systems to not put in the database, which would otherwise be. Note that files are pruned when a file system is reached; any file system mounted under an undesired file system will be ignored. The environment variable PRUNEFS also sets this value. Default is nfs NFS proc. --output=dbfile The database file to build. Default is /var/lib/locatedb. --localuser=user The user to search non-network directories as, using su(1). Default is to search the non-network directories as the current user. You can also use the environment variable LOCALUSER to set this user. --netuser=user The user to search network directories as, using su(1). Default is nobody. You can also use the environment variable NETUSER to set this user. --old-format Create the database in the old format. This is a synonym for --dbformat=old. --dbformat=F Create the database in format F. The default format is called LOCATE02. F can be old to select the old database format (this is the same as specifying --old-format). Alternatively the slocate format is also supported. When the slocate format is in use, the database produced is marked as having security level 1. If you want to build a system-wide slocate database, you may want to run updatedb as root. --version Print the version number of updatedb and exit. --help Print a summary of the options to updatedb and exit. SEE ALSO
find(1), locate(1), locatedb(5), xargs(1) Finding Files (on-line in Info, or printed) BUGS
The updatedb program correctly handles filenames containing newlines, but only if the system's sort command has a working -z option. If you suspect that locate may need to return filenames containing newlines, consider using its --null option. The best way to report a bug is to use the form at http://savannah.gnu.org/bugs/?group=findutils. The reason for this is that you will then be able to track progress in fixing the problem. Other comments about updatedb(1) and about the findutils package in general can be sent to the bug-findutils mailing list. To join the list, send email to bug-findutils-request@gnu.org. UPDATEDB(1)
All times are GMT -4. The time now is 10:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy