bash find the files in a given path

tree -fi --noreport /u01/abc/def >/u01/abc/physicalfiles.txt

-finds the files in the directory and dumps the path of each file as a line in the file physicalfiles.txt.

or

find /u01/abc/def -type f | sort -o "/u01/abc/physicalfiles.txt"

finds the files in the path /u01/abc/def and sorts the result and dumps the result in the file physicalfiles.txt

No comments:

Post a Comment