Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [inode]

The tag has no usage guidance, but it has a tag wiki.

56
votes
6answers
133k views

How can I increase the number of inodes in an ext4 filesystem?

I had a problem (new to me) last week. I have a ext4 (Fedora 15) filesystem. The application that runs on the server suddenly stopped. I couldn't find the problem at first look. df showed 50% ...
116
votes
5answers
115k views

What is a Superblock, Inode, Dentry and a File?

From the article Anatomy of the Linux file system by M. Tim Jones, I read that Linux views all the file systems from the perspective of a common set of objects and these objects are superblock, inode, ...
26
votes
4answers
13k views

Can a file be retrieved by its inode?

I ran following commands in the order specified: $ln a b $ls -i a b 523669 a 523669 b $rm -f a $ls -i b 523669 b I concluded from this test that the command rm actually removes only the filename (a ...
178
votes
7answers
333k views

Find where inodes are being used

So I received a warning from our monitoring system on one of our boxes that the number of free inodes on a filesystem was getting low. df -i output shows this: Filesystem Inodes IUsed ...
20
votes
2answers
6k views

why inode value changes when we edit in “vi” editor?

When I edit a file in "vi" editor the inode value of the file is changing. But when edited with cat command the inode value is not changing.
45
votes
9answers
102k views

How do I count all the files recursively through directories

I want to see how many files are in subdirectories to find out where all the inode usage is on the system. Kind of like I would do this for space usage du -sh /* which will give me the space used in ...
30
votes
2answers
3k views

Why do the directories /home, /usr, /var, etc. all have the same inode number (2)?

I find that under my root directory, there are some directories that have the same inode number: $ ls -aid */ .*/ 2 home/ 2 tmp/ 2 usr/ 2 var/ 2 ./ 2 ../ 1 sys/ 1 proc/ I only know that the ...
50
votes
2answers
29k views

List all files with the same inode number?

Lets say, when I do ls -li inside a directory, I get this: 12353538 -rw-r--r-- 6 me me 1650 2013-01-10 16:33 fun.txt As the output shows, the file fun.txt has 6 hard links; and the inode number is ...
43
votes
4answers
49k views

Quickly find which file(s) belongs to a specific inode number

I know of this command: find /path/to/mountpoint -inum <inode number> but it is a very slow search, I feel like there has to be a faster way to do this. Does anybody know a faster method?
28
votes
2answers
2k views

Why does a software package run just fine even when it is being upgraded?

Say I am running a software, and then I run package manager to upgrade the software, I notice that Linux does not bring down the running process for package upgrade - it is still running fine. How ...
10
votes
2answers
3k views

Is it possible to rename a file or directory using the inode?

I changed the /home directory to a different partition and couldn't access the files from it, something I have been able to solve from this question - How do you access the contents of a previous ...
3
votes
1answer
710 views

Where are my inodes going?

My root filesystem is running out of inodes. If this were an issue of disk space, I'd use du -s to get a top-level overview of where the space is going, then head down the directory tree to find ...
35
votes
5answers
8k views

Can I run out of disk space by creating a very large number of empty files?

It is well-known that empty text files have zero bytes: However, each of them contains metadata, which according to my research, is stored in inodes, and do use space. Given this, it seems logical ...
10
votes
6answers
6k views

Portable way to find inode number

At first I used stat -c %i file (to help detect the presence of a jail), which seemed to work on any Linux distribution under the sun. On OS X' I had to use ls -i file | cut -d ' ' -f 1. Is there ...
6
votes
3answers
8k views

“mv” file with garbled name by inode number?

I have several files with encoding issues in their file names (German umlauts, burned on CD with Windows, read by Windows and synced to Linux with Seafile. Something, somewhere went wrong...). Bash ...
9
votes
1answer
1k views

Finding all the hard-links of a file without traversing the file system

I have seen in this page that inodes have a link counter to know how many files (read: "directory entry") point to this inode. Is there a way to know which directories contain such entries without ...
2
votes
2answers
1k views

Is a -rw-rw-rw- file really inaccessible inside a drwxrwx— directory?

Say I have a directory with these permissions: drwxrwx--- Inside this directory, a file with these permissions: -rw-rw-rw- Is the file readable/writable by everyone or not ? If not, how secure is ...
6
votes
1answer
1k views

Limit the inode cache used by a command

I want to run a task with limits on the kernel objects that they will indirectly trigger. Note that this is not about the memory, threads, etc. used by the application, but about memory used by the ...
5
votes
2answers
1k views

Linux: How does hard-linking to a directory work?

I'm aware that Linux does not allow hard-linking to a directory. I read somewhere, that this is to prevent unintentional loops (or graphs, instead of the more desirable tree structure) in the file-...
12
votes
3answers
65k views

How do I find the inode of any directory?

There is literally nothing on google that I can find that will help me answer this question. I presume it is passing some other parameter to ls -i?
8
votes
2answers
4k views

Difference between xattr and chattr

What is the relation and the difference between xattr and chattr? I want to know when I set a chattr attribute in Linux what is happening inside the Linux kernel and inode metadata.
7
votes
2answers
3k views

Why does '/' have the inode 2?

On many *nix systems like OS X and Ubuntu, We can see the inode of root directory is 2. Then what is the inode 1 used for?
6
votes
3answers
179 views

What characterizes a file in Linux/Unix?

What characterizes a file in Linux/Unix? A file can have many types: regular file, directory, symlink, device file, socket, pipe, fifo, and more that I miss. For example, a symlink: $ sudo file /...
5
votes
4answers
10k views

Does the inode change when renaming or moving a file?

in PHP the fileinode() functions returns the inode of a file. I was wondering if I can use it to determine if a file was renamed, moved or modified. I did some tests and it seems the inode stays the ...
16
votes
3answers
24k views

What is an orphaned inode? [closed]

I understand what an inode is but what is the exact definition of an orphaned inode? I don't really get what that means. UPDATE There was a time that a server I was managing ran out of inodes but ...
17
votes
2answers
2k views

Can two files on two separate filesystems share the same inode number? [duplicate]

If I run a command like this one: find / -inum 12582925 Is there a chance that this will list two files on separate mounted filesystems (from separate partitions) that happen to have been assigned ...
12
votes
2answers
12k views

Is it possible to change Inode count on an ext4 filesystem? [duplicate]

Possible Duplicate: How can I increase the number of inodes in an ext4 filesystem? I have a homemade NAS with Debian Wheezy 64bit. It has three disks - 2x2TB and 1.5TB, pooled together using ...
7
votes
1answer
108 views

Why directory with large amounts of entries does not shrink in size after entries are removed?

Close vote notice: While the linked duplicate asks same question, the comments and the only answer do not provide an answer which draws from authoritative source. The answer on my question by Thomas ...
2
votes
1answer
2k views

what is inode for, in FreeBSD or Solaris

I know a little about linux kernel. BUt for Freebsd, the "vnode" actually is similar to the "inode" in Linux kernel. And there is a "inode" concept in FreeBSD or Solaris. So my question is: what is "...
0
votes
0answers
115 views

Whose `I-Node` does `netstat -ap` for unix domain sockets refer to?

What does I-Node mean in the output of netstat -ap for unix domain sockets? It seems not the same as the inode of the socket file: $ netstat -ap ... Active UNIX domain sockets (servers and ...
2
votes
1answer
4k views

How do I manually modify an inode?

I am using Ubuntu Linux and, just for fun, I want to create a hardlink to a directory (as seen here). Because I'm just doing this for fun, I'm not looking for any sort of pre-developed directory-...
2
votes
2answers
1k views

Unlinking files in /dev/shm not freeing memory?

I get the feeling I'm going insane, or tmpfs is very broken for long term use. I have a workload that very rapidly creates and unlinks files in /dev/shm/[some directory tree]. Linux Slab usage (in ...
2
votes
2answers
165 views

Is the sticky bit not used in current file systems

Can I safely conclude that the sticky bit is not used in current file sysems and reuse the bit for my own purpose.
1
vote
1answer
222 views

Why do files sometimes change but not the inode or vice versa?

When a file is updated then the corresponding inode gets updated. But sometimes the following condition occurs file is same and inode is new file gets changed but corresponding inode is older Why ?...
1
vote
1answer
670 views

How directory size is calculated?

I ran this on my CentOS 7.3 instance. [user01@ ~]$ rm -rf my-very-own-directory/ [user01@ ~]$ mkdir my-very-own-directory/ [user01@ ~]$ stat my-very-own-directory/ | grep "Size" Size: 6 ...
-1
votes
1answer
89 views

Need of Dentry despite traversal could be done by Inode

In Linux, if we have directories represented as special type of files having entry of each file name it has. Obviously, we could traverse and find out paths, then why do we need Dentries to assist us ...