w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Bash - List files in current directory with full path

Instead of parsing ls, use find again:

for i in $(find /mydirectory/ -type d); do cd $i && find
$PWD -type f -name "*.*" | sort -nr | head -5 >>
/mydirectory/myfile.txt; done




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.