首页 → Linux教程
背景:
阅读新闻
Ubuntu与XP共享文件夹方式下的文件复制脚本
[日期:2012-12-09]来源:Linux社区作者:szkbsgy[字体:]
#此脚本用于在Ubuntu环境下拷贝一个文件到共享文件夹中
#contiki_Share为共享文件夹的名字
#!/bin/sh#function:cp a file(such as xx.hex) to /mnt/hgfs/contiki_Share that is the shared directory# between xp and vmware ubuntu#file name: file_cp.sh#date: 2012-07-29
#example:
#使用方法:file_cp.sh file_name
#parameter detection;检测是否为一个参数(参数为要拷贝的文件)if [ $# -ne 1 ]thenecho “ERROR:there mush be one parameter”exitfi
#dir detection;
#共享目录检测,用于检测在ubuntu是否存在共享目录,如不存在,则挂载if [ -d /mnt/hgfs/contiki_Share ]then echo “dir contiki_Share exist”elsesudo mount -t vmhgfs .host:/ /mnt/hgfsfi
echo “$1″sudo cp ./”$1” /mnt/hgfs/contiki_Share/echo “$1 has been copied to /mnt/hgfs/contiki_Share/”
#注:运行脚本需要以超级用户权限运行
0
Linux下的fork()函数
Ubuntu下使用wireshark进行网络抓包
相关资讯 Ubuntu系统教程 Ubuntu共享文件夹
图片资讯
本文评论 查看全部评论 (0)
评论声明
最新资讯
本周热门
Linux公社简介 – 广告服务 – 网站地图 – 帮助信息 – 联系我们本站(LinuxIDC)所刊载文章不代表同意其说法或描述,仅为提供更多信息,,也不构成任何建议。Copyright © 2006-2011 Linux公社 All rights reserved 浙ICP备06018118号
宁愿停歇在你门前的那棵树上,看着你,守护你。