日期:2014-05-16 浏览次数:20622 次
?? 我习惯在windows下用source insight浏览代码,然后在linux下进行编译,但是修改的问题如何从linux能使用是个问题。
之前总是用ftp传过去,但是修改频繁了用起来还是很麻烦的。后来突然从网上找到了一个非常好的方法,就是在linux
下把windows的硬盘mount过来,这样在linux上就想使用本地硬盘一样可以直接编译,修改都可以了。
方法如下:
在windows下共享需要允许访问的文件夹
然后在linux下:使用cifs类型mount
??? mount -o sync -t cifs //192.168.171.113/www /home/www -o username=sinykk,password=sinykk,rw
用户名和密码一定要对否者会禁止访问
linux系统硬盘格式化,mkfs.ext3 /dev/hdb1
?硬盘挂载 mount -t ext3 /dev/sdb /home/
?卸载硬盘分区 umount /dev/sdb
系统启动时,自动挂载硬盘。修改/etc/fstab
[root@as4-231 home]# more /etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/VolGroup00/LogVol00 /?????????????????????? ext3??? defaults??????? 1 1
LABEL=/boot???????????? /boot?????????????????? ext3??? defaults??????? 1 2
none??????????????????? /dev/pts??????????????? devpts? gid=5,mode=620? 0 0
none??????????????????? /dev/shm??????????????? tmpfs?? defaults??????? 0 0
none??????????????????? /proc?????????????????? proc??? defaults??????? 0 0
none??????????????????? /sys??????????????????? sysfs?? defaults??????? 0 0
/dev/VolGroup00/LogVol01 swap??????????????????? swap??? defaults??????? 0 0
/dev/hdc??????????????? /media/cdrom??????????? auto??? pamconsole,exec,noauto,managed 0 0
/dev/fd0??????????????? /media/floppy?????????? auto??? pamconsole,exec,noauto,managed 0 0
/dev/sdb??????????????? /home/coremail/var/ms/01 ext3?? defaults??????? 1 1