MY UBUNTU PC HAS THE FREE INODES I WANT TO USE ALL OF THEM WITH A AUTOMATIC SHELL SCRIPT. HERE ONE THING I DON'T WANT TO CREATE ANY FILE THAT MEANS WITHOUT CREATING ANY FILE I HAVE TO USE ALL FREE INODES IS THERE ANY COMMAND ? OR SCRIPT? asked 24 Oct '14, 10:36 ashokkrishna |
You can't do it by creating hard links - that doesn't use an inode. A hard link is a file name that is associated with a pre-existing file the inode. Now what you want can be done - sort of. It will take a bit C code to do it right. The procedure is to do the following:
step 4 is also a fork bomb. It will keep creating new processes until it fails... and then it cleans up for itself (you could then wait for terminal input on stdin though...) Now this doesn't exhaust the inode list - you can check the actual limits with "ulimit -n". But what you can THEN do is run the program in the background... Up to the process limits ("ulimit -u"). In my case, the number of files is limited to 1024, and the number of processes is limited to 4096. That means the total number of files that can be created this way would be 4096*1024 or 4,194,304 inodes. This may not use up ALL the inodes (depends on previous usage). The total number of inodes that you could allocate this way can be checked using "df -i". This will list the number of inodes that you can use - so pick the filesystem with fewest number available that you can use. (this is likely to be /tmp). On my system /home is a 300GB disk with ext4 used for the filesystem. There are a total of 30,531,584 inodes, with 29,773,826 free - so I can't use up all the inodes this way even if I wanted to. /tmp on the other hand has only 1,021,909 inodes... WARNING - don't do this on a filesystem using xfs. You can't exhaust the inodes because xfs will just allocate another disk block for inodes. answered 03 Mar '15, 18:36 Jesse Pollard |
Hi, Create Hard link, so in this way you will utilize all your inodes without breaching the limiting condition stated by your friend. When you create a hard link, it just created a new name in the table, along with the inode, without moving the file Disclaimer : All the suggestions given over here to resolve the issue or to help the person who has asked questioned. If system behaves abnormally or become dead or questioner lost any data I will not be responsible for it. Regards, LINUXKIDA answered 17 Nov '14, 08:54 LINUXKIDA |
Hi, Create Hard links, so in this way you will utilize all your inodes without breaching the limiting condition stated by your friend. When you create a hard link, it just created a new name in the table, along with the inode, without moving the file Disclaimer : All the suggestions given over here to resolve the issue or to help the person who has asked questioned. If system behaves abnormally or become dead or questioner lost any data I will not be responsible for it. Regards, LINUXKIDA answered 17 Nov '14, 08:54 LINUXKIDA |
So you want to search directly from the inodes - the only way I can think of is 1) search the internet for software already written, if it exists, or 2) go thru the development docs about processing the file system and write your own code. The major scripting languages have system calls to do low-level hacking. There isn't anything that comes to mind from the linux utilities. There are thousands to research and its not me who wants to do this ... Have you found anything yet? Regards, Steve answered 15 Nov '14, 11:13 stevendupuis |
Inodes are generated when a filesystem is created. I don't understand your question - what do you mean by 'I want to use all of them ...' If you do this your file system will become unusable. What are you actually trying to accomplish? If you wish to free up extra inodes, the filesystem must be backed up and then recreated again with less inodes. See mkfs command for this.
no i want to actually hack the things so iam searching is there any way to use all inodes to hack my friend
cause he challenged me without creating files