-bash: ulimit: pipe size: cannot modify limit: Invalid argument

简介:

从root账号切换到oracle账号时,出现了“-bash: ulimit: pipe size: cannot modify limit: Invalid argument”提示,一般出现这个错误是因为在设置.bash_profile时,没有注意空格的缘故造成。例如(注意红色部分)

例1:

if [ $USER = "oracle" ]; then
  if [$SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -p 65536
  else
    ulimit -u 16384 -n 65536
  fi
fi

例2:

if [ $USER = "oracle" ]; then
  if [ $SHELL="/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -p 65536
  else
    ulimit -u 16384 -n 65536
  fi
fi

今天帮一个同事看这样的问题时,遇到了一个特例,如下所示,ulimit -u 16384-n 65536少了空格,也出现了这个错误,正确的写法ulimit -u 16384 -n 65536

clip_image001

相关文章
|
4月前
|
Linux Shell Windows
4:Bash shell命令-步入Linux的现代方法
4:Bash shell命令-步入Linux的现代方法
53 0
|
6月前
|
关系型数据库 MySQL Shell
【Linux命令】-bash: mysql: command not found
【Linux命令】-bash: mysql: command not found
56 0
|
8月前
|
Ubuntu 安全 Linux
不用安装虚拟机,直接在Windows上面运行Linux Bash Shell,嗯!真香!!!
不用安装虚拟机,直接在Windows上面运行Linux Bash Shell,嗯!真香!!!
153 0
|
2天前
|
Java Shell Linux
【linux进程控制(三)】进程程序替换--如何自己实现一个bash解释器?
【linux进程控制(三)】进程程序替换--如何自己实现一个bash解释器?
|
16天前
|
存储 Shell Linux
【攻防世界】unseping (反序列化与Linux bash shell)
【攻防世界】unseping (反序列化与Linux bash shell)
|
2月前
|
Linux Shell
mac/linux提示bash: telnet: command not found
mac/linux提示bash: telnet: command not found
|
9月前
|
Kubernetes Shell Linux
linux中sh/bash 进程为何不接受kill SIGTERM
在k8s的优雅终止中,如果容器的入口进程是sh 或者bash,需要注意你设定的gracefulterminate是无效的
106 0
|
10月前
|
Java Shell Linux
如何在 Linux 中使用 Bash For 循环
如何在 Linux 中使用 Bash For 循环
90 0
|
10月前
|
Unix Shell Linux
Linux中sh与bash的区别(详细介绍)
Linux中sh与bash的区别(详细介绍)
320 0
|
11月前
|
Shell Linux
Linux pip命令报错 -bash: pip: command not found
Linux pip命令报错 -bash: pip: command not found
255 0