FC6 . TCL脚本中: if { [catch {exec mv $filedir\/* $targetdir/} result] } { puts "error:$result" 运行结果: error:mv: cannot stat `/aaa/*': No such file or directory /aaa已存在.用的是绝对路径.脚本不在根目录下. 如果用具体的文件名代替*,也可以在脚本中运行成功. 但这个目录下有多个不规则文件,能不能用一条语句实现文件移动? 手动在shell执行mv /aaa/* ....也能成功.在脚本中就不行. [ 本帖最后由 thin...
1、file类是IO包中唯一代表磁盘文件本身信息的类,而不是文件中的内容 2、file类定义了一些与平台无关的方法类操作文件,例如创建、删除文件和重命名文件、判断文件的读写权限等。 3、Java中的目录被当作一种特殊的文件使用,list方法可以返回目录中的所有子目录和文件名。 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/67175/showart_691564.html
#include
发现了一个奇怪的问题,我的程序在下面没有问题,可以得到正确的,数据并且显示图象,但是同样的程序在下得到的文件大小是不一样的,很奇怪,好象文件指针发生了偏移从中的129和130可以看出,文件指针的偏移不是80000,大家遇到过同样的问题吗,这个问题把我弄郁闷了,偏偏老师需要的是版本.下面是程序和log /************************************************ This program make difference between 2 images, this differ...
root@nmsvr # ls FXS9 base root@nmsvr # ls -l ./base: No such file or directory drwxrwxr-x 4 vobadmin answgrp 54 Mar 7 2006 FXS9 base这个文件夹明明是可以看到的,但是却ls -l不到。 请大家指点,谢谢
inittab file Purpose Controls the initialization process. Description The /etc/inittab file supplies the script to the init command's role as a general process dispatcher. The process that constitutes the majority of the init command's process dispatching activities is the /etc/getty line process, which initiates individual terminal lines. Other processes typically dispatched by the init comman...
通常在配置文件路径的时候用dirname(__file__)是非常有效的方法,但是因为__file__的路径是当前代码所在文件(而不是url所在文件)完整路径,所以定义配置文件通常要放在根目录下定义网站的根地址,但是下面的方法可以解决配置文件的存放问题。 dirname(dirname(__file__)); /* 假设__file__为 /home/web/config/config.php 上面的方法输出为 /home/web */ dirname(dirname(__file__));得到的是文件上一层目录名 dirna...
[code] $ file $(ls | head ) [/code] 上面的命令输出头10个ls输出文件的类型。$()的用法是怎样?在file的手册里没找到,是shell的特性?
我有一个扩张名为“.a”的归档文件,从PC传到fttp大机上,但在unix下,执行 ar –tv lib000.a 命令时,提示这个文件不是一个归档格式的文件,而我用file 命令 查了一下,显示是归档文件,请问这是为什么?应如何解决?谢谢!