免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2469 | 回复: 9
打印 上一主题 下一主题

求助,solaris上format非交互运行。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-08-25 10:48 |只看该作者 |倒序浏览
打算使用 format -f command-file
但是不知道command-file该如何书写。
哪位能给个例子?

要实现的内容很简单,就是把设备c4t13d28  format一下。

交互操作时的例子:
-----------------------------------------
对指定的vol进行format。
①        执行format命令,指定vol(c4t13d2,如:format c4t13d28
②        进入format菜单,执行format命令(选f),选y,会出现format的进度显示。
③        执行quit(或者q)退出format。
-----------------------------------------

想把这段内容以非交互实现。谢谢。

论坛徽章:
0
2 [报告]
发表于 2006-08-25 11:02 |只看该作者
没有root权限,没办法试,你自己参考尝试吧
-f command-file
      Take command input from command-file rather  than  the
      standard  input.  The  file must contain commands that
      appear just as they would if  they  had  been  entered
      from  the keyboard.  With this option, format does not
      issue continue? prompts; there is no need  to  specify
      y(es)  or  n(o)  answers  in the command-file. In non-
      interactive mode, format does not initially expect the
      input  of  a  disk  selection  number.  The  user must
      specify the current working disk with the -d disk-name
      option when format is invoked, or specify disk and the
      disk selection number in the command-file.

论坛徽章:
0
3 [报告]
发表于 2006-08-25 11:03 |只看该作者
这个帮助我已经看过了。
但是写出来的文件不能使用。

论坛徽章:
0
4 [报告]
发表于 2006-08-25 11:18 |只看该作者
跑到这里来问了?

用fmthard -s 然后指定分区起点和长度、位置就可以了。多么easy的事情。用不着脚本。

论坛徽章:
0
5 [报告]
发表于 2006-08-25 12:38 |只看该作者
这个不是因为难才用脚本的。
脚本是用来自动化测试的。

论坛徽章:
0
6 [报告]
发表于 2006-08-25 14:29 |只看该作者
找到怎么做了,如下:
format -f format.txt  c2t132d0

format.txt
----------------------------
format
quit
---------------------------

论坛徽章:
0
7 [报告]
发表于 2006-08-25 14:35 |只看该作者
原帖由 softcar 于 2006-8-25 14:29 发表
找到怎么做了,如下:
format -f format.txt  c2t132d0

format.txt
----------------------------
format
quit
---------------------------


呵呵,关键是要大胆的测试嘛,我们多数都没有条件,又不敢真的format
还是要靠自己

论坛徽章:
0
8 [报告]
发表于 2006-08-25 14:40 |只看该作者
呵呵 测得很郁闷哦~
幸好我的是对测试服务器所连的磁盘阵列上的盘进行format,随便尝试~

论坛徽章:
0
9 [报告]
发表于 2006-08-25 14:47 |只看该作者
就是啊,你老哥有那么好的条件可以随便的测

论坛徽章:
0
10 [报告]
发表于 2009-06-05 14:53 |只看该作者
好东西
可以同时操作方便啊!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP