A file system has been corrupted and needs to be restored. Which file contains the ufsdump levels for this file system? ()
第1题:
import java.io.*;
import java.util.*;
public class FileClass {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
try{
File file=new File(args[0]);
System.out.println(args[0]+"文件");
if(file.isFile()){
//是否为文件
System.out.print(file.canRead()?"可读":"不可读");
System.out.print(file.canWrite()?"可写":"不可写");
System.out.print(file.length()+"字节");//注意不能调用数组类型 File[] 的 length()例:File[] files=file.listFiles();不可以这么调用filess.length()
}
else{
//列出所有文件及目录
File[] files=file.listFiles();
ArrayList<File> fileList=new ArrayList<File>();
for(int i=0;i<files.length;i++){
//先列出目录
if(files[i].isDirectory()){
//是否为目录
//取得路径名
System.out.println("路径"+"[ "+files[i].getPath()+" ]");
}
else{
//文件先存入fileList,待会再列出
fileList.add(files[i]);
}
}
//列出文件
for(File f:fileList){
System.out.println(f.toString());
}
System.out.println();
}
}
catch(ArrayIndexOutOfBoundsException e){
System.out.println("using:java FileDemo pathname");
}
}
}
结果:using:java FileDemo pathname
是不是创建的对象所代表的文件没有被创建成功
File file=new File(args[0]); 就是创建一个args[0]所指文件路径的文件对象。出现异常的原因是:你把args[0]作为文件路径,而你运行时又没有指定。
第2题:
A.A logical volume must exist prior to running the crfs command to create a file system
B.A file system must be unmounted before it can be removed
C.Defining a file system imposes a structure on a logical volume
D.Removing a file system using rmfs automatically removes the underling logical volume
第3题:
A.Compilation fails.
B.Nothing is added to the file system.
C.Only a new file is created on the file system.
D.Only a new directory is created on the file system.
E.Both a new file and a new directory are created on the file system.
第4题:
Which command displays the amount of space available on the storage media?()
第5题:
A.A file system cannot be mounted on a directory containing data.
B.Mounting a file system on a mount point containing data will delete the data.
C.Mounting a file system on a amount point containing data will make the data temporarily inaccessible.
D.A systems administrator must manually create an empty directory prior to mounting an AIX JFS.
第6题:
The ______ has several major components, including the system kernel, a memory management system, the file system manager, device drivers, and the system libraries.
A.application
B.information system
C.network
D.operating system
第7题:
A.Increasing the size of a logical volume also increases the size of the file system
B.Reducing the size of a logical volume requires reducing the size of the file system first
C.Increasing the size of a file system requires increasing the size of the logical volume first
D.Increasing the size of a file system also increases the size of the logical volume when necessary
第8题:
A.Compilation fails.
B.The file system has a new empty directory named dir.
C.The file system has a new empty directory named newDir.
D.The file system has a directory named dir, containing a file f1.txt.
E.The file system has a directory named newDir, containing a file f1.txt.
第9题:
Which statement is true about "full state backup" in a Cisco Unified Computing System?()
第10题:
A corrupted file system is now repaired and back in use. Some, but not all of the files within the file systems have been deleted. The only backup of this file system is a month-old tar archive. This archive will need to be restored as root. Which two statements correctly describe the effects of the restore operation?()