Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List files with absolute path recursive in linux

Tags:

linux

bash

This 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

like image 648
Stollan Avatar asked Jul 26 '10 13:07

Stollan


1 Answers

Check out the find command and its printf option.

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

See the man page of find for more information.

like image 51
ghostdog74 Avatar answered Oct 23 '22 10:10

ghostdog74