Search Results

Search found 1 results on 1 pages for 'user599395'.

Page 1/1 | 1 

  • how sort recursively by maximum fileze and counts files type?

    - by user599395
    Hello! I'm beginner in bash programming. I want to display head -n $1 results of sorting files by size in /etc/*. The problem is that at final search, I must know how many directories and files has processed. I compose following code: #!/bash/bin let countF=0; let countD=0; for file in $(du -sk /etc/* |sort +0n | head $1); do if [ -f "file" ] then echo $file; let countF=countF+1; else if [ -d "file" ] then let countD=countD+1; fi done echo $countF echo $countD I have errors at execution. How use find with du, because I must search recursively?

    Read the article

1