当前位置: 首页 > news >正文

东莞清溪镇做网站公司洛阳工程建设信息网站

东莞清溪镇做网站公司,洛阳工程建设信息网站,阿里云配置wordpress,陕西网站设计2019独角兽企业重金招聘Python工程师标准 概览#xff1a; 设备文件的创建 权限 设备名 类型 主设备号 次设备号 mknod [-m MODE] NAME type [MAJOR MINOR] 创建时#xff0c;先查看是否存在设备号的冲突 零磁道零扇区是MBR#xff1a;Maste… 2019独角兽企业重金招聘Python工程师标准 概览 设备文件的创建          权限    设备名 类型  主设备号 次设备号     mknod [-m MODE] NAME type [MAJOR MINOR] 创建时先查看是否存在设备号的冲突 零磁道零扇区是MBRMaster Boot Record             主引导记录             512Bytes: 引导启动OS                 前446bytes: 存放程序bootloader                 64bytes: 分区表每16bytes标记一个分区一共4个分区主分区                 2bytes: 55AA, MBR有效性标记   标记当前mbr是否有效 fdisk是不支持GPT格式的硬盘分区parted是可以支持的                parted [options] [device [command [options...]...]]  直接跟设备不跟其他会分区 -l, --list  会列出所有分区信息     lists partition layout on all block devices command    mklabel label-type      Create a new disklabel (partition table) of label-type.  label-type should  be  one  of      bsd, dvh, gpt, loop, mac, msdos, pc98, or sun. mkpart part-type [fs-type] start end      Make  a  part-type partition with filesystem fs-type (if specified), beginning at start      and ending at end (by default in megabytes).  fs-type can be one of  fat16,  fat32,      ext2,  HFS, linux-swap, NTFS, reiserfs, or ufs.  part-type should be one of      primary, logical, or extended. move partition start end      Move  partition  so  that it begins at start and ends at end.  Note: move never changes      the minor number. rm partition      Delete partition. print  Display the partition table.     # parted /dev/sdb mkpart primary ext4 1 10G     #parted /dev/sdb rm 1 # parted /dev/sdb print                          磁盘管理     I/O设备         磁盘         网卡     文件read, write, open, close     设备文件特殊文件         只有inode而没有数据         关联至一个驱动程序进而跟对应的硬件设备打交道         /dev: b, c             每个设备都有其设备号                 主设备号用于标记设备类型                 次设备号用于标记同一类型中的不同设备      mknod - make block or character special files      -m, --modeMODE               set file permission bits to MODE, not arw - umask         mknod [OPTION]... NAME TYPE [MAJOR MINOR]  主设备号可以相同次设备号不能相同         TYPE may be:        b      create a block (buffered) special file 有缓存        c, u   create a character (unbuffered) special file 无缓存的        p      create a FIFO             设备文件的命名由ICANN互联网名称与数字地址分配机构Internet              Corporation for Assigned Names and Numbers [rootlinux_basic tmp]#mknod -m 664 blocktest b 1 20 [rootlinux_basic tmp]#ls -l total 0 brw-rw-r--. 1 root root 1, 20 Jan  4 07:38 blocktest [rootlinux_basic tmp]#rm blocktest rm: remove block special file blocktest? y [rootlocalhost tmp]# mknod test c 1 30 [rootlocalhost tmp]# ls -l total 0 lrwxrwxrwx. 1 root root     8 Dec  2 13:10 file1 - softfile -rw-r--r--. 1 root root     0 Dec  2 13:09 softfile crw-r--r--. 1 root root 1, 30 Dec  2 13:27 test     磁盘设备文件命名         /dev/hd:             IDE: 并口接口, 133MB/s         /dev/sd:             USB: 串行             SATA: 串行接口6Gbps/8             SCSI: 并行(Small Computer System Interface) 小型计算机系统接口             SAS串行             rpm转数         /dev/sd[a-z]             分区数字                 /dev/sda1                 /dev/sda2                 分区编号                     主扩展分区1-4                     逻辑分区5开始     硬盘分区         磁道track             扇区sector         柱面cylinder             分区根据柱面划分在同一盘片上的两面磁头同时读取速度快         零磁道零扇区是MBRMaster Boot Record             主引导记录             512Bytes: 引导启动OS                 前446bytes: 存放程序bootloader                 64bytes: 分区表每16bytes标记一个分区一共4个分区主分区                 2bytes: 55AA, MBR有效性标记   标记当前mbr是否有效             1T: 3主1扩展切割1个或多个逻辑分区                     [rootlinux_basic tmp]#fdisk -l | grep -A 3 ^Disk /dev/.*         Disk /dev/sda: 48.3 GB, 48318382080 bytes         255 heads磁头数, 63 sectors/track每磁道多少扇区, 5874 cylinders柱面         Units cylinders of 16065 * 512 8225280 bytes         Sector size (logical/physical): 512 bytes / 512 bytes         --         Disk /dev/mapper/vg_lvm-lv1: 12.9 GB, 12884901888 bytes         255 heads, 63 sectors/track, 1566 cylinders         Units cylinders of 16065 * 512 8225280 bytes         Sector size (logical/physical): 512 bytes / 512 bytes         --         Disk /dev/mapper/vg_lvm-lv2: 10.7 GB, 10737418240 bytes         255 heads, 63 sectors/track, 1305 cylinders         Units cylinders of 16065 * 512 8225280 bytes         Sector size (logical/physical): 512 bytes / 512 bytes            /proc:         [rootlinux_basic tmp]#cat /proc/partitions         major minor  #blocks  name                    8        0   47185920 sda            8        1     204800 sda1            8        2   10485760 sda2            8        3   36494336 sda3          253        0   12582912 dm-0          253        1   10485760 dm-1     分区创建      fdisk - Partition table manipulator for Linux      操作Linux分区表         查看fdisk -l [DEVICE]...    fdisk工具最多可以识别15个分区         创建分区fdisk [DEVICE]             交互式界面有许多子命令                 p: 显示磁盘分区表                  p   print the partition table                 n: new新建分区                  n   add a new partition                 d: delete删除分区                 d   delete a partition                 t: 修改分区的系统ID                 t   change a partitions system id                 l: 列表出所有已知的系统ID                 l   list known partition types                    83  Linux                    82  Linux swap / So                    8e  Linux LVM                     fd  Linux raid auto                 w: 保存并退出                 w   write table to disk and exit                 q: 不保存退出                 q   quit without saving changes 选n后出现                     e   extended    p   primary partition (1-4)             对于已经有分区处于使用状态的磁盘来讲新建分区后需要让内核重读其分区表                 CentOS 5:                     # partprobe [DEVICE]                 CentOS 6:                     partx -a [DEVICE]                     partx - telling the kernel about presence and numbering of on-disk partitions.                     -a     add specified partitions or read disk and add all partitions                     读磁盘新增的分区                     kpartx -af  [DEVICE]                     kpartx - Create device maps from partition tables                     -a     Add partition mappings                     -l     List partition mappings that would be added -a                     -f     force creation of mappings; overrides ’no_partitions’ feature       查看/proc/partitions,有显示则创建成功             分区创建工具sfdisk和parted ------------------------------------------------------------------ Command (m for help): n Command action    e   extended    p   primary partition (1-4) e Partition number (1-4): 1 First cylinder (1-6527, default 1): Using default value 1 Last cylinder, cylinders or size{K,M,G} (1-6527, default 6527): 5G                             注意这里设定大小时的格式 Command (m for help): p Disk /dev/sdb: 53.7 GB, 53687091200 bytes 255 heads, 63 sectors/track, 6527 cylinders Units cylinders of 16065 * 512 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000    Device Boot      Start         End      Blocks   Id  System /dev/sdb1               1         654     5253223   5  Extended Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. [rootlvm ~]# partx -a /dev/sdb   Warning: Disk has a valid GPT signature but invalid PMBR.   Assuming this disk is *not* a GPT disk anymore.   Use gpt kernel option to override.  Use GNU Parted to correct disk. BLKPG: Device or resource busy error adding partition 1 [rootlvm ~]# kpartx -af /dev/sdb   Warning: Disk has a valid GPT signature but invalid PMBR.   Assuming this disk is *not* a GPT disk anymore.   Use gpt kernel option to override.  Use GNU Parted to correct disk. [rootlvm ~]# cat /proc/partitions major minor  #blocks  name    8        0   52428800 sda    8        1     204800 sda1    8        2   10485760 sda2    8       16   52428800 sdb    8       17          1 sdb1  说明创建成功了 -------------------------------------------------------------------------------   死循环的一个简单脚本 [rootlvm ~]# bash -n hello.sh [rootlvm ~]# ./hello.sh Hello:ld Again  hello:jhfld Again  hello:n [rootlvm ~]# cat hello.sh #!/bin/bash # read -p Hello: kir while true;do if [ $kir n ];then     break; else     read -p Again  hello: kir fi done ------------------------------------------------------------------     练习写一个脚本         1、提示输入一个对其执行分区的新硬件设备文件         2、提醒用户接下来的操作销毁所有的数据你继续吗             y或yes: 继续             n或no退出             其它字符提醒输错了再来一次         3、对磁盘新建分区             主分区1大小512M             主分区2大小2G         4、创建完成后显示创建的结果 成功完成及修改次数 ---------------------------------------------------------------- [rootlvm shells]# cat disk_part.sh #!/bin/bash # read -p Input a partition disk device path: disk read -p The following operation will damage the all data on the disk.yes|no(y|n)? flag while true;do     if [ $flag n -o $flag no ];then      break;   elif [ $flag y -o $flag yes ];then echo n p 1 512M n p 2 2G w|fdisk $disk /dev/null   partx -a $disk   kpartx -af $disk   fdisk -l | grep  $disk   read -p The following operation will damage the all data on the disk.yes|no(y|s)? flag   else      echo Input error.      read -p Again input: flag    fi done 转载于:https://my.oschina.net/u/1762991/blog/665603
http://www.zqtcl.cn/news/378670/

相关文章:

  • 哪有专做飞织鞋面的网站广州企业网站制作哪家好
  • 如何用域名做邮箱 网站站长工具5g
  • 威海 医院网站建设宝安专业网站设计公司
  • 营销企业网站建设步骤建筑 企业官网设计
  • 网站建设的内容网站怎么做视频的软件
  • 大型网站多少钱企业咨询管理是干嘛的
  • 陕西建设银行网站小企业网站建设公司
  • linux下网站开发计算机网络技术专业主要学什么
  • 长沙网站维护公司建个门户网站
  • 做采集网站难不做科技的网站
  • 中小微企业服务平台seo怎么提升关键词的排名
  • 优秀企业网站欣赏店名设计wordpress文章列表添加字段
  • 有哪些做软件的网站服务器安装WordPress没有权限访问
  • app开发和网站开发公司网站怎么做百度竞价
  • 医疗机构网站备案网站建设面试常见问题
  • 建设网银登录网站国内欣赏电商设计的网站
  • 自适应网站优点缺点网站上的在线答题是怎么做的
  • 查询单位信息的网站免费学编程的网站有哪些
  • 建设企业网站进去无法显示wordpress 在线课程
  • 博客型网站建设广州网站建设如何做
  • 网站导航栏全屏怎么做万年网站建设
  • flash源码网站百度关键词价格
  • 个人网站如何发布怎么做记步数的程序到网站
  • 石家庄网站制作公司排名前十可视化网站开发工具有哪些
  • 网站个人博客怎么做杭州网站改版公司电话
  • 烟台北京网站建设公司中国建筑信息资讯网
  • 硬盘做网站空间高端网站设计杭州
  • 南昌网站建设方案网站建设需求分析班级
  • 汉阳做网站关键词站长工具
  • 做海报图片的网站营销软件