A
A
Alexander Vladimirovich2019-07-18 21:14:07
linux
Alexander Vladimirovich, 2019-07-18 21:14:07

What is the maximum file path length in ext4 and directory nesting level?

Greetings!
What is the maximum file path length in ext4 and directory nesting level?
meaning /home/a/b/c/d full path

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
rPman, 2019-07-18
@polyanin

ext4 limits the length of a filename to 255 bytes (utf8 can be a variable amount per character) but does not limit the number of nested directories, but on Linux the maximum length of a path when opening a file is 4096 bytes (the MAX_PATH variable in limits.h) but this is the length of the path string, you can open a file relative to a directory, or mount a file system to a specific path, and so on.

L
latush, 2019-07-18
@latush

There are no set restrictions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question