Is there a command that I can list, at once, all the links(path) of a give file ( including hard link and soft link)? If not, can it be down by writing a script? Thanks a lot.
I can't think of a way to list all the soft links.
To find the hard links, first run ls -li to find out the inode number of the file. Then do a find from the root of the file system (hard links do not cross mount points) for that inode.
Example from a Solaris 10 box:
In this case /usr/bin is the root file system, so I chose not to run the find from / as it would look in other file systems. The 3 between the file permissions and root means there are 3 links to one file.
Hello.
I have some main directories.
For example :
/main_dir1
/main_dir2In main_dir2, I have a sub dir named sub_dir2-1 with 2 files in it ( file_2-1, file_2-2 )
/main_dir2sub_dir2-1file_2-1
file_2-2From "/main_dir1/A/B/C" I make a soft link
ln -s /main_dir2/sub_dir2-1 ... (6 Replies)
Hi,
I have a file with more than 1 layers of soft links for it. For ex.
ls -la .profile
.profile@ -> /home/act/.profile_abc
ls -la
/home/act/.profile_abc@ -> .profile_final
I want to get the name of the last file (i.e. .profile_final) when I refer to .profile using shell script. I... (2 Replies)
HI,
I would like to ask You about some good books or links where I can find information about shells, theoretical information.
I will be grateful if You can help me
And I have question about zsh loop
trivial script:
#!/bin/zsh
for i in {1..100000}
do
echo $i;
doneexec time is 10... (9 Replies)
Hi,
I do not want to violate any rules, so thought to ask before posting any links.
Just to contribute to the forum: through surfing I found a link to download "Unix in a Nutshell" (*.chm) FREE.
I was wondering if I can post that link here.
Thanks
Hemang (5 Replies)