Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
what do you mean by that?
when you execute ls -l you will see something like this:
Code:
eporand@elxj3lld12-mf:/tmp/a$ ls -la
total 0
drwxr-xr-x 2 user group 140 Feb 24 14:46 .
drwxrwxrwt 17 root root 580 Feb 24 14:45 ..
-rw-r--r-- 3 user group 0 Feb 24 14:46 asdf
-rw-r--r-- 3 user group 0 Feb 24 14:46 asdf1
-rw-r--r-- 1 user group 0 Feb 24 14:46 asdf2
-rw-r--r-- 3 user group 0 Feb 24 14:46 asdf3
-rw-r--r-- 1 user group 0 Feb 24 14:46 asdf4
at the hardlinked files you will see the number of hard links.
also you can check the man page of find (see -links)
Hi All,
Is there any command or shell scripting to view only the link files under / .
As suggested, you can read the man page on the find command, and also read the man page on the ls command. BOTH have ample documentation to let you do what you're after. And if you want to write a shell script to do this, that's certainly something that can be done.
Every file/dir that's not a sym link is a hard link. So a simple inverse sym link search would return everything that is not a sym link, and is therefore a hard link.
Last edited by suicidaleggroll; 02-24-2015 at 10:28 AM.
Every file/dir that's not a sym link is a hard link.
And for that matter, every symlink has at least one hard link, i.e., the directory entry that points to the inode that contains the symlink. The only things in the filesystem that do not have a hard link are deleted files that are held open by some process and will be removed as soon as they are closed.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.