Linux Fundamentals (iii)--File Rights Management & CD-ROM, mirroring mount

Source: Internet
Author: User
Tags bz2 disk usage

Linux file Rights Management change document attribution
ls  -ld  文档...           查看文件归属chown  -R(目录)   属主  文档...chown  -R           :属组  文档...chown  -R               属主:属组  文档...    同时修改属主、属组
Access rights
读取  —read写入  —write可执行  —excute‘如果用户对一个文件有 r、w、x权限:‘r,查看文件内容(cat、vim看、less、……)w,修改文件内容(vim)x,能够运行程序文件‘如果用户对一个目录有 r、w、x权限:‘r,查看目录内容(ls)w,修改目录内容(mkdir、touch、mv、rm、cp、……)x,进入目录(cd)‘文件的 r、w权限对root不管用文件的 x权限对root也管用‘
Document Permission bit analysis
ls   -ld  /boot  /etc/passwd  /opt/studir/  查看文档权限dr-xr-xr-x. 4 root       root      4096 5月  31 11:54 /boot第1个字符,对应文档类型(d 目录、- 文件、l 快捷方式)第2~4个字符,对应属主的权限第5~7个字符,对应属组的权限第8~10个字符,对应其他人的权限
Change document Permissions
chmod  -R  用户类别+-=权限组合  文档...1)查看归属(u、g、o)、查看权限(r、w、x)      ls  -ld  文档...2)更改文档的归属     chown  -R  属主:属组  文档...3)更改文档的权限      chmod  -R  ugoa+-=rwx  文档
Document backup and Recovery
压缩包的格式:.zip(微软)、.rar、.7z(好压、WinRAR、快压).tar归档、.gz、.bz2、.xz(gzip、bzip2、xz).tar.gz、.tar.bz2、.tar.xz备份与恢复 zip,制作的备份文件只关注资料内容(不方便保留文档属性)tar,制作的备份文件可以记录文档的各种属性制作/释放zip格式的备份文件zip  -ry     新备份文件.zip  被备份的文档...           制作unzip       备份文件.zip                             释放到当前文件夹unzip       备份文件.zip   -d  目标文件夹            释放指定文件夹‘统计目录/文件占用的磁盘空间大小(Disk Usage)du  -sh  /boot‘制作/释放tar格式的备份文件制作 .tar.* 备份文件tar   -zcPf   备份文件.tar.gz   被备份的文档...tar   -jcPf   备份文件.tar.bz2   被备份的文档...tar   -JcPf   备份文件.tar.xz   被备份的文档...释放 .tar.* 备份文件tar  -xf   备份文件.tar.*tar  -xf   备份文件.tar.*  -C  目标文件夹(必须已经存在)tar  -xPf   备份文件.tar.*
Command option resolution
-c : 创建新的归档备份-z : 调用gzip工具对归档执行压缩/解压缩处理-j :  调用bzip2工具对归档执行压缩/解压缩处理-J : 调用xz工具对归档执行压缩/解压缩处理-p : 保留被备份文件的绝对路劲-f :  指定归档备份文件的路径及名称
Mount/unmount discs, ISO images
‘挂载和自动挂载都需要提前准备挂载点‘mount    被挂载的设备    挂载点文件夹mount   /ISO文件名   /mnt/loopumount   挂载点文件夹
Implement auto-mount CentOS7 image file on boot
1)准备挂载点目录    mkdir  -p  /repo/cos7dvd2)修改 /etc/fstab 配置文件,添加开机挂载设置    vim  /etc/fstab      /CentOS-7-x86_64-DVD-1611.iso  /repo/cos7dvd  iso9660  defaults 0 0    mount  -a          检查fstab配置,并且挂载能挂载的设备    ls  /repo/cos7dvd/      确认挂载点(有文档)3)重启系统验证    reboot    ls  /repo/cos7dvd/      //确认挂载点(有文档)    
Common Linux-level catalogs:
/root,管理员的家目录/home,普通用户的家目录的父目录/boot,存放系统内核等启动文件/dev,存放各种硬件设备/etc,存放各种系统配置(resolv.conf、hostname、……)/bin、/usr/bin、/sbin、/usr/sbin,存放各种可执行程序/mnt,一般用来存放挂载点目录/opt,用来存放第三方的软件应用/var,用来存放各种变化的文档(比如 /var/www/html)

Linux Fundamentals (iii)--File Rights Management & CD-ROM, mirroring mount

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.