The linux kernel defines PATH_MAX
and NAME_MAX
in limits.conf
.
What would happen if I increase those constants and recompile the kernel?
Also, I believe I would have to change it in /usr/include/linux/limits.h
and recompile libc (and any program that includes the header).
- Would I be able to create files with longer paths/names?
- What would happen if I mount a filesystem with those long filenames on another system?
For question 2:
I know the kernel will keep you from creating files where the path is more than PATH_MAX
.
However, I wonder how it handles when the filesystem itself is providing it with a path longer than that (e.g. after an ls
).