Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • TOP-N Sql to find Nth max or Top N rows Oracle
  • plan10g.sql good1 Oracle
  • Important Solaris Commands Linux/Unix
  • Jai Shree Ram Oracle
  • Facts about SCN and Rollback Segment Oracle
  • configUOCIOTTO.ora Oracle
  • How to find pinned objects from shared pool. (pinned via dbms_shared_pool.keep) Oracle
  • move_arch_files.ksh Linux/Unix
  • Oracle Recommended Patches — Oracle Database ID 756671.1 Oracle
  • chk_space_SID.ksh Linux/Unix
  • Oracle Release Explaination Oracle
  • How to find who is using which Rollback segment and how many rows or blocks in that rollback segments, Oracle
  • Adding addidional hard drive and attach it to a linux box. Linux/Unix
  • How to check current redo log progress redo_progress.sql Oracle
  • How to calculate PROCESSES parameter Oracle

find_du.ksh to find # of files, their sizes in current folder and its subdolder

Posted on 10-Oct-2006 By Admin No Comments on find_du.ksh to find # of files, their sizes in current folder and its subdolder

#!/usr/bin/ksh

for dirname in `find . -type “d”`

do

#print “dirname is $dirname”;

tot_files=`ls -rlt $dirname| grep -i “^-” | wc -l`

tot_file_size=`ls -rlt $dirname| grep -i “^-” | awk ‘{tot+=$5} END {print tot/1024/1024}’`

echo “Folder : $dirname, Total Files : $tot_files, Total File Sizes : $tot_file_size MB”

done

Linux/Unix, shell

Post navigation

Previous Post: Looping for remote servers and find its database from oratab file.
Next Post: Some OS level threshold for performance.

Related Posts

  • Paste command syntax Linux/Unix
  • Establishing trusted relationship between dbmonitor( central monitoring) and monitoring targets. Linux/Unix
  • Sending email with file attachment. Linux/Unix
  • oracle 10g on linux Linux/Unix
  • Find total file sizes Linux/Unix
  • chk_space_SID.ksh Linux/Unix

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Django (0)
  • GIT (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (395)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (150)
  • SQL scripts (343)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • prepfiles.sh for step by step generating pending statistics files10-Mar-2026
  • tracksqltime.sql05-Mar-2026
  • Complete Git Tutorial for Beginners25-Dec-2025
  • Postgres DB user and OS user.25-Dec-2025
  • Trace a SQL session from another session using ORADEBUG30-Sep-2025
  • SQL Server Vs Oracle Architecture difference25-Jul-2025
  • SQL Server: How to see historical transactions25-Jul-2025
  • SQL Server: How to see current transactions or requests25-Jul-2025
  • T-SQL Vs PL/SQL Syntax25-Jul-2025
  • Check SQL Server edition25-Jul-2025

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • sqlnet.ora paramters Oracle
  • DBMS_STATS Metalinks Notes Oracle
  • Oracle 11g Environment Setup Oracle
  • Nice notes on wait events Oracle
  • Proc Compilation Oracle
  • Find average Row Length and other table size calculation. metalink notes Oracle
  • Index Range Scan Oracle
  • Find Command Linux/Unix

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme