LINUX基本命令
来源:互联网 发布:unity3d 在线更新 编辑:程序博客网 时间:2024/06/08 17:58
文件权限
mkdir:创建目录 目录创建之后 最大是777 必须具备X权限
文件创建之后,具备权限会变成绿色
文件默认情况创建下是没有X权限的,可增加X权限。最大是666
目录真实权限=777-umask
文件真实权限=666-umask
参数:
-m:指定权限,以数字方式
-p:创建多级目录,无论该目录是否存在
chmod
1) 使用字母方式
2) 使用数字方式
rmdir:删除 目录且不能是空目录,也不能包含隐藏的目录
rm:文件 –r
[root@bogon root]# cd /home
[root@bogon home]# ls
dir_1 file_1 passwd user.tar zhangwei
dir_1.zip file_2 shadow user.tar.gz
[root@bogon home]# rm file_1
rm:是否删除一般文件‘file_1’?
[root@bogon home]# ls
dir_1 file_1 passwd user.tar zhangwei
dir_1.zip file_2 shadow user.tar.gz
[root@bogon home]# rmdir dir_1
rmdir: ‘dir_1’:目录非空
[root@bogon home]# rm dir_1
rm:是否删除目录‘dir_1’?y
rm: 无法删除目录‘dir_1’: 是一个目录
[root@bogon home]# rm -r dir_1
rm:是否进入目录‘dir_1’?
[root@bogon home]# rm -r dir_1
rm:是否进入目录‘dir_1’?y
#ls---相对路径
ls------ls---color
#/bin/ls――绝对路径
rm----rm –i 给出提示
cp----cp -i
ctrl+c
kill
[root@bogon home]# ls
dir_1 file_1 passwd user.tar zhangwei
dir_1.zip file_2 shadow user.tar.gz
[root@bogon home]# rm -rf dir_1
[root@bogon home]# ls
dir_1.zip file_1 file_2 passwd shadow user.tar user.tar.gz zhangwei
[root@bogon home]# rm -f *
rm: 无法删除‘zhangwei’: 是一个目录
[root@bogon home]# rm -rf zhangwei
[root@bogon home]# ls
[root@bogon home]# ls
[root@bogon home]# mkdir dir1
[root@bogon home]# ls
dir1
[root@bogon home]# ls -l
总用量 4
drwxr-xr-x (755) 2 root root 4096 12月 8 08:37 dir1
[root@bogon home]#
- 【Linux】Linux基本命令
- Linux基本命令-mkdir命令
- linux基本命令-mysql命令
- Linux基本命令
- Linux基本命令
- linux基本命令
- linux基本命令(编译)
- Linux Mysql基本命令
- Linux基本命令
- Linux初学者基本命令
- linux基本命令
- Linux基本命令介绍
- linux基本操作命令
- Linux基本操作命令
- LINUX的基本命令
- LINUX的基本命令
- Linux基本命令
- linux基本命令
- matlab与excel xlsread、xlswrite实用方法
- linux下gdb单步调试(上)转载
- CUDA学习之cuda在VS2005下的安装配置
- 黑马程序员-Ado.net学习之参数化查询(防止sql注入)
- com技术内幕--读书笔记(6)
- LINUX基本命令
- struts2学习笔记
- 使用quartz2D绘制阴影的代码
- pthread 等待
- 六之续、由KMP算法谈到BM算法
- LINUX查找命令、替换、管道符号
- 我的2011卖身记
- linux下gdb单步调试(中)(转摘)
- (android developers)intent