开发者

List files with absolute path recursive in linux

开发者 https://www.devze.com 2023-01-09 02:21 出处:网络
T开发者_运维知识库his question is quite similar to How can I list files with their absolute path in linux?

T开发者_运维知识库his question is quite similar to How can I list files with their absolute path in linux?

I want to get the name of file or folder with absolute path and date modified.

This command almost does it:

ls -lR /foo/bar | awk '{print $6,$7,$8,$9}'

But it doesnt show the absolute path.

Regards Stollan


Check out the find command and its printf option.

find /foo/bar -printf "%p %A@"

See the man page of find for more information.


I like to use:

ls -d -1 $PWD/**


After reading some partial solutions no recursion, partial date format, no pipe... my proposition is from the target folder:

find . -type f -exec ls -lAoUtTh {} \; | awk '{print $9"\t"$5"\/"$6"\/"$8"\t"$7"\t"$4}' | grep -E -i '.*\.fcp\b|.*\.omf\b'

Works well thanks to contributors but very slowly basicly me.

Gilles

OsX Darwin 10.8 bash

0

精彩评论

暂无评论...
验证码 换一张
取 消