LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-06-2023, 11:19 AM   #1
eawedat
LQ Newbie
 
Registered: Aug 2012
Posts: 11

Rep: Reputation: Disabled
How to list all files and directories that have the maximum number of the same inode number?


how to list all files and directories that have the maximum number of the same inode number in the home directory?

for example:

inode file/directory name

112233 file1
112233 myfile
112233 myDocs

345566 Docs
345566 Downloads

then it should print
/home/sysadmin/file1
/home/sysadmin/myfile
/home/sysadmin/myDocs

as the inode 112233 has more links than the inode 345566
 
Old 02-06-2023, 11:35 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by eawedat View Post
how to list all files and directories that have the maximum number of the same inode number in the home directory?

for example:

inode file/directory name

112233 file1
112233 myfile
112233 myDocs

345566 Docs
345566 Downloads

then it should print
/home/sysadmin/file1
/home/sysadmin/myfile
/home/sysadmin/myDocs

as the inode 112233 has more links than the inode 345566
This is the third of what appears to be homework questions you've posted today...all without showing any effort of your own. You've been a member here for *ELEVEN YEARS* and were told previously that you need to show your own efforts, and that we're not going to do homework/write scripts for you.

There are many ways to accomplish your task; which way have you chosen to do it, and what have you got so far???
 
  


Reply

Tags
bash, linux, shell



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Neither specifying inode ratio nor inode quantity seems to have an effect on mkfs.ext2 Bogomips_ Linux - Software 4 01-24-2017 07:24 PM
questions abt inode.inode gurus plz have a look aceone Red Hat 7 05-22-2011 12:11 PM
Maximum number of directories under XFS ttsang123 Linux - Newbie 6 02-24-2010 12:26 PM
Can two files have the same inode number? sambyte Linux - Newbie 5 02-04-2009 06:27 AM
How Do I List All Files Linked To inode? freedomics Linux - Software 1 04-24-2007 06:18 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration