Scripts for calculating size and remaining space of a directory automatically.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Scripts for calculating size and remaining space of a directory automatically.
# 1  
Old 12-12-2005
Question Scripts for calculating size and remaining space of a directory automatically.

I would like to create a script for calculating size and remaining space of a directory automatically every 24 hours, then send an email to report to the admin.

* POSIX and PERL are preferred.

Can anyone help, please?
# 2  
Old 12-13-2005
the command is simple, you can use

df|awk '{print $1 $3 $4}' | mail username

To make is check every 24 hours, you ll have to set this command as a cron job.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Calculating size of backups

hi everyone i have posted this query but i dont where it has gone i am posting again . my issue is that i have many backup files in a backup nfs share and i need to calculate it size just by adding their individual file sizes which is repetitive jobs. so is there any command or variation of du... (1 Reply)
Discussion started by: janakors
1 Replies

2. UNIX for Beginners Questions & Answers

Calculating size of backups

hi everyone i have a backup share mounted with me on solaris 10 which have daily backups. everyday i need to calculate all individual sizes of files and need to report somewhere. e.g i have .rman 7backup files daily . what i need that is there any commnd or variation of du command which can add... (1 Reply)
Discussion started by: janakors
1 Replies

3. Shell Programming and Scripting

How to Calculating space used in GB for any particular directory in UNIX?

How to Calculating space used in GB for any particular directory in unix Currently I am using : df -h which gives me space for each mout point ldndyn1:/vol/v01/dyn/sbcexp/dyn 1.1T 999G 29G 98% /sbcimp/dyn but I need for some internal particular directory... (3 Replies)
Discussion started by: RahulJoshi
3 Replies

4. Shell Programming and Scripting

Automatically determining directory path for scripts and programs

I have some C++ code in the following directory structure /home/chrisd/tatsh/trunk/hstmy/ ├── baseLib ├── bin │ ├── awk │ ├── bash │ ├── diag │ ├── ksh │ │ └── TAG201011 │ ├── old │ ├── perl │ ├── prog │ ├── py │ └── tcsh ├── docs ├── fortran ├── others... (0 Replies)
Discussion started by: kristinu
0 Replies

5. Shell Programming and Scripting

Help with calculating size of files.

Hi All, I am very new to shell scripting. I have a text file which is the output of another utility. This text file has a list of SAF files which is basically a list of orphan attachments in the attachments directory. Now I want to read each file name from the file, get its size and repeat this... (6 Replies)
Discussion started by: RajeshReddy
6 Replies

6. Programming

calculating size of int

Hi, Is there any way to calculate the size of a built in data type without using 'sizeof' operator? I also don't have the option to read it from std .h file. regards Apoorva Kumar (10 Replies)
Discussion started by: apoorvasharma80
10 Replies

7. HP-UX

Remaining Space After Mirroring

My HP9000 has 10 disks of 9.1 GB each. With help of the fpmurphy (thank you) it is knowing that 8 of them are mirrored (using lvdisplay). What should i do to know which is the existent free space after mirroring. Regards (1 Reply)
Discussion started by: cgege
1 Replies

8. Filesystems, Disks and Memory

Calculating Disc Space

Ok.... Can someone please point me in the right direction. I simply want to know how to take the results of a dfspace or df command and be able to know how to determine how much disk space is either used or remaining. 1$ dfspace Filesystem 512-blocks Free %Used Iused %Iused Mounted... (5 Replies)
Discussion started by: Docboyeee
5 Replies

9. Programming

Disk Space Remaining

Does anyone know any C code to get the remaining disk space ? (2 Replies)
Discussion started by: spu230479
2 Replies

10. UNIX for Advanced & Expert Users

Hard Dirve Space Remaining

DOES ANYONE KNOW IF THERE IS ANY C CODE YOU CAN USE WITHIN UNIX TO FIND THE REMAINING DISK SPACE ON A HARD DRIVE. (4 Replies)
Discussion started by: spu230479
4 Replies
Login or Register to Ask a Question