Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Temporary Tablespace Information and restriction. Oracle
  • Oracle Internal Good Websites 1 Oracle
  • mutex in Oracle 10.2.0.2 or Oracle 10g Oracle
  • Wait Based Tuning Step by step with SQL statement Oracle
  • SQL Server: How to see current transactions or requests SQL Server
  • Optimizer_Index init.ora parameter explaination. Oracle
  • 339939.1 Running Cluster Verification Utility to Diagnose Install Problems Oracle
  • Monitor Long Running Job Oracle
  • Rollback force for distributed transactions Oracle
  • compile_inv.sql Oracle
  • scripts to take listener.log backup Linux/Unix
  • MYSQL for Oracle DBA MYSQL
  • pvmehta.com SQL scripts
    Find which sessions is accessing object that prevent your session to have exclusive locks in Oracle Oracle
  • standard Monitoring – 1 Oracle
  • Best approach for Oracle database patching sequence to latest/required patchset along with CPU/PSU/any-other-one-off patch ID 865255.1 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

  • How to know Number of CPUs on Sun Box Linux/Unix
  • Find long Running Transaction Linux/Unix
  • tar and untar a dolder with all its subfolder. Linux/Unix
  • Passing from Unix to PLSQL using bind variables Linux/Unix
  • purge_trc.sh Linux/Unix
  • Remove DOS CR/LFs (^M) 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)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (393)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (0)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (342)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • 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
  • Checking SQL Server Version25-Jul-2025
  • Oracle vs MYSQL Architecture differences (For DBAs)24-Jul-2025
  • V$INSTANCE of Oracle in MYSQL24-Jul-2025
  • Day to day MYSQL DBA operations (Compared with Oracle DBA)24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Process Map for CPU and Memory for OS processes Linux/Unix
  • Metalink Note: Note:250655.1 : ADDM Basics USING THE AUTOMATIC DATABASE DIAGNOSTIC MONITOR Oracle
  • sqlnet.ora paramters Oracle
  • note id 373303.1 Linux/Unix
  • Oracle 11g Training on 29JAN1010 Oracle
  • Histogram information Oracle
  • Oracle 11g Environment Setup Oracle
  • The most important Tuning Notes Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme