- [Q] Hard links and soft links?
- Posted by Tester A. on November 29th, 2003
Hi,
I would like to know which files are linked to a certain file?
For example,
After doing these,
ln -s ORIG /somewhere/softlinks
ln -s ORIG /somewhere2/softlinks
ln ORIG /somewhere/hardlinks1
ln ORIG /somewhere2/hardlinks2
Before deleting the file named ORIG, I would like to know what files (the
full path of the link files) are linked to the file ORIG.
TIA.
- Posted by mjt on November 29th, 2003
On Sat, 29 Nov 2003 12:18:23 GMT, "Tester A." <benew666@hotmail.com> wrote:
LINUX: Rute User's Tutorial and Exposition (Version 1.0.0)
http://www.icon.co.za/~psheer/book/index.html.gz
..
--
/// Michael J. Tobler: motorcyclist, surfer, skydiver, \\\
\\\ and author: "Inside Linux", "C++ HowTo", "C++ Unleashed" ///
Children are natural mimic who act like their parents despite every
effort to teach them good manners.
- Posted by Tester A. on November 29th, 2003
Nothing related to my question there.
I would like to find the link files that are pointing to the orignal files
in the FS, just before doing something with the orignal file.
"Tester A." <benew666@hotmail.com> wrote in message
news:j80yb.38995$jb.381848@news.bora.net...
- Posted by Leon. on November 29th, 2003
"Hactar" <ebenONE@tampabay.ARE-ARE.com.unmunge> wrote in message
news:bqaol1$dn$1@pc.tampabay.rr.com...
Perhaps a quicker way is to use the "locate" database (rebuilt with
updatedb), if you are happy that the links in the excluded areas arent a
problem. This will only work when we know what the NAME of the files we are
trying to find are.
locate NAME| xargs ls -ald
The sym links are then obvious, and the hard links can be determined by the
name and the link count on the ls output... the link count counts the number
of hard links to the file. This only
- Posted by Leon. on November 30th, 2003
"Hactar" <ebenONE@tampabay.ARE-ARE.com.unmunge> wrote in message
news:bqbcq3$vr3$1@pc.tampabay.rr.com...
Whats this line meant to mean ?
Perhaps if you give an example someone can understand it.
.... is a filename hackers use, are u trying to get people to run your
trojans ?
struth ! if you bloody put spaces in link names then pay the price !
I made it clear that 'updatedb' will update the database. (which takes about
the same time as one find / )
Where is it bad to ls ???? I've never hit it.
- Posted by Juha Laiho on November 30th, 2003
ebenONE@tampabay.ARE-ARE.com.unmunge (Hactar) said:
.... and "any" really means any:
- the filesystem may not be currently mounted
- the filesystem may be a remote filesystem to which there's no
access from the current machine
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
- Posted by John-Paul Stewart on December 1st, 2003
Hactar wrote:
Wouldn't that just match any single character? Shouldn't the regular
expression be ".*" to match everything?
- Posted by John-Paul Stewart on December 1st, 2003
Hactar wrote:
Ahh..."substring match". Now it makes sense.
- Posted by LEE Sau Dan on December 4th, 2003
Hactar> Find a file in ORIG's filesystem with ORIG's inode:
Hactar> find $MOUNT_POINT -inum $INODE -xdev
Hactar> For soft links, I don't know of a reliable way, and the
Hactar> links can be on any filesystem.
I guess this should work:
find / -follow -inum $INODE
--
Lee Sau Dan +Z05biGVm-(Big5) ~{@nJX6X~}(HZ)
E-mail: danlee@informatik.uni-freiburg.de
Home page: http://www.informatik.uni-freiburg.de/~danlee