Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to determine system value for _POSIX_PATH_MAX

Can anyone please tell me how to find the system value for _POSIX_PATH_MAX in Linux mint? I know that it is available in the <limits.h> file but I do not know how to find its value.

like image 209
robert williams Avatar asked Jun 10 '15 20:06

robert williams


2 Answers

The tool to use, according to POSIX, is named getconf(1):

  $ getconf _POSIX_PATH_MAX
  256
like image 136
Jens Avatar answered Oct 18 '22 19:10

Jens


One more way to get it's value.

#include "stdio.h"
#include "unistd.h"
#include "limits.h"

int main()
{
    printf ("Value :: %d \n", _POSIX_PATH_MAX);
    return 0;
}
like image 23
Verma Avatar answered Oct 18 '22 19:10

Verma