列出文件和文件子目录
//来 自 NowJava.com - 时 代 Java import java.io.File; import java.io.IOException; public class Main{ public static void main(String[] args) throws NumberFormatException, IOException { long st = Long.parseLong(args[0]); long end = Long.parseLong(args[1]); String directoryLinux = "/Users/yourName/test"; listFilesAndFilesSubDirectories(directoryLinux, st, end); } public static void listFilesAndFilesSubDirectories(String directoryName, long st, long end) { File directory = new File(directoryName); File[] flist = directory.listFiles(); for (File file : flist) { if (file.isFile()) { if (file.lastModified() > st && file.lastModified() < end) System.out.println(file.getAbsolutePath(