sudo redirect
来源:互联网 发布:云豹直播app源码下载 编辑:程序博客网 时间:2024/06/05 05:08
Permission denied when redirection with sudo
Answer:
When you are doing redirection with sudo, such as the following command
# sudo echo 1 > /proc/sys/vm/drop_caches-bash: /proc/sys/vm/drop_caches: Permission denied
You will get permission denied as the redirection will be performed as the user calling sudo, not as the superuser. So if you don't have permission to write to the target file, you will get permission denied.
To solve the problem, use the following method
sudo sh -c 'echo 1 > /proc/sys/vm/drop_caches'
what's wrong ?
- sudo redirect
- Redirect
- Redirect
- redirect
- redirect
- redirect
- sudo
- sudo
- sudo
- Sudo
- sudo
- sudo
- sudo
- sudo
- sudo
- sudo
- Sudo
- sudo
- Oracle之 ORA-12560:TNS:protocol adapter error
- Bugs Bugs
- __bridge,__bridge_transfer和__bridge_retained详解
- Unity3D的断点调试功能
- easyui---treegrid 实例
- sudo redirect
- 10 个免费的 C/C++ 集成开发环境
- static作用(修饰函数、局部变量、全局变量)
- maven学习笔记(三)pom文件
- MySQL索引与Index Condition Pushdown
- c++修改函数返回地址
- H264参数语法文档: SPS、PPS、IDR
- ios 简易计算器
- 解惑Spring嵌套事物