Sponsored Content
Full Discussion: A question for links in Unix
Top Forums UNIX for Dummies Questions & Answers A question for links in Unix Post 95756 by 98_1LE on Saturday 14th of January 2006 11:20:43 AM
Old 01-14-2006
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:
Code:
> cd /usr/bin
> ls -li zcat
      3262 -r-xr-xr-x   3 root     bin        27176 Jan 22  2005 zcat
> find . -inum 3262
./compress
./uncompress
./zcat
>

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.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Question posting links

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)
Discussion started by: hemangjani
5 Replies

2. UNIX for Advanced & Expert Users

links in UNIX

Hi Can you please tell me how to create a softlink to a file on a different partition ? thanks (3 Replies)
Discussion started by: infyanurag
3 Replies

3. UNIX for Dummies Questions & Answers

Collection of Unix Links

Hi, Is there is a good collection of Links to Unix Related stuff? Regards, Kriss (1 Reply)
Discussion started by: Kriss
1 Replies

4. UNIX for Dummies Questions & Answers

hard links in unix

hi i have a hardlink how can i find the source of it (2 Replies)
Discussion started by: jpriyank
2 Replies

5. Shell Programming and Scripting

Book and Links about Shells; and zsh question

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)
Discussion started by: Physix
9 Replies

6. UNIX for Dummies Questions & Answers

A Basic Question About Links

How can you tell if a file is linked to another file?????? Do not title posts "Urgent", etc. Per forum rules. (3 Replies)
Discussion started by: BIGGDRE10
3 Replies

7. UNIX for Dummies Questions & Answers

Symbolic links in UNIX

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)
Discussion started by: deo_kaustubh
2 Replies

8. UNIX for Dummies Questions & Answers

Soft links question

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)
Discussion started by: jcdole
6 Replies
GZEXE(1)                                                      General Commands Manual                                                     GZEXE(1)

NAME
gzexe - compress executable files in place SYNOPSIS
gzexe name ... DESCRIPTION
The gzexe utility allows you to compress executables in place and have them automatically uncompress and execute when you run them (at a penalty in performance). For example if you execute ``gzexe /usr/bin/gdb'' it will create the following two files: -rwxr-xr-x 1 root root 1026675 Jun 7 13:53 /usr/bin/gdb -rwxr-xr-x 1 root root 2304524 May 30 13:02 /usr/bin/gdb~ /usr/bin/gdb~ is the original file and /usr/bin/gdb is the self-uncompressing executable file. You can remove /usr/bin/gdb~ once you are sure that /usr/bin/gdb works properly. This utility is most useful on systems with very small disks. OPTIONS
-d Decompress the given executables instead of compressing them. SEE ALSO
gzip(1), znew(1), zmore(1), zcmp(1), zforce(1) CAVEATS
The compressed executable is a shell script. This may create some security holes. In particular, the compressed executable relies on the PATH environment variable to find gzip and some standard utilities (basename, chmod, ln, mkdir, mktemp, rm, sleep, and tail). BUGS
gzexe attempts to retain the original file attributes on the compressed executable, but you may have to fix them manually in some cases, using chmod or chown. GZEXE(1)
All times are GMT -4. The time now is 08:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy