在时髦的'ls -l'

Sri*_*ath 4 unix groovy

我需要ls -l在groovy中使用unix命令显示文件的名称,大小,日期.

我们如何ls -l在groovy中查看信息?

提前致谢.

Bel*_*lla 7

"ls -l".execute().text
Run Code Online (Sandbox Code Playgroud)

应该这样做


Mic*_*rdt 6

def list = 'ls -l'.execute().text
list.eachLine{
    // code goes here
}
Run Code Online (Sandbox Code Playgroud)