码迷,mamicode.com
首页 > 系统相关 > 详细

几个Linux命令

时间:2015-08-11 18:33:58      阅读:158      评论:0      收藏:0      [点我收藏+]

标签:

find . -name "*.rpm" -exec mv {} /root/rhevm-packages/ \;

如何mount虚拟机的磁盘镜像:

fdisk -ul /path/to/image

You must set cylinders.

You can do this from the extra functions menu.

? ?

Disk /home/chaolinz/chaolinz-vm-01.img: 0 MB, 0 bytes

255 heads, 63 sectors/track, 0 cylinders, total 0 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00002624

? ?

Device Boot Start End Blocks Id System

/home/chaolinz/chaolinz-vm-01.img1 2048 1050623 524288 82 Linux swap / Solaris

Partition 1 does not end on cylinder boundary.

/home/chaolinz/chaolinz-vm-01.img2 * 1050624 20971519 9960448 83 Linux

Partition 2 has different physical/logical endings:

phys=(1023, 254, 63) logical=(1305, 106, 17)

? ?

得到分区2(主分区)的起点块1050624后,乘以块大小512Byte,得到偏移量537919488

mount -o loop,offset=537919488 /path/to/image /tmp/img/

64-bit主机上编译报错:error: gnu/stubs-32.h: No such file or directory

  • 安装glibc-devel.i686即可

CIFS共享Windows文件:

  • mount -t cifs //hostname/sharedfolder . -o servern=xxx,username=xxx,password=xxx\r

? ?

? ?

几个Linux命令

标签:

原文地址:http://www.cnblogs.com/CodeComposer/p/4721634.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!