On CentOS5, the default limit for open file is 1024. If we want to change the number of open file limit, (say, raise it to 50000), we can do the following:
$ sudo
# vi /etc/security/limits.conf
Enter the following lines to the file /etc/security/limits.conf:
* hard nofile 50000
* soft nofile 50000
Then save and exit the file. From a regular user's shell, run "ulimit -n", and you will see that the number of open file limit is now "50000":
$ ulimit -n
50000
The soft limit cannot be higher than the number in the hard limit.
Recent comments
3 weeks 4 days ago
4 weeks 5 days ago
8 weeks 3 days ago
33 weeks 3 days ago
34 weeks 2 days ago
45 weeks 2 days ago
46 weeks 5 days ago
1 year 3 weeks ago
1 year 3 weeks ago
1 year 4 weeks ago