---
title: "linux 修改读取最大文件数"
author: "wangwei3"
date: "2012-06-11T14:31:15Z"
tags: []
categories: ["操作系统"]
slug: "linux"
draft: false
lastmod: "2012-06-11T14:31:15Z"
id: 1558311
url: "https://wangwei3.iteye.com/blog/1558311"
---

查看linux读取文件数量用 ulimit -n 查看
如果是root 权限 可以用 ulimit -n size 来修改linux读取额外年间数量
但是非root权限会报 limit command not found 的异常

非root权限的处理方法

```java


If you want to set it permanently, especially for a particular user, change the file /etc/security/limits.conf to have the following lines (assume user = www-data)
E.g.
www-data hard nofile 65535
www-data soft nofile 65535


```