05-18-2005
finding disk space usage
How would I go about finding the about of disk space occupied by a certain directory?
For example, /u1/cvera => 530 MB
Thanks =)
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have just written a script in /bin/bash, however, l want to test if character is a carriage return or space. Also l want my script to be able to detect my disk space and send a mail if usage is more than 90% or send an alert.
Thanks
Kayode (6 Replies)
Discussion started by: kayode
6 Replies
2. UNIX for Dummies Questions & Answers
how can we determine the disk space
used by a certain directory? (1 Reply)
Discussion started by: gfhgfnhhn
1 Replies
3. Shell Programming and Scripting
Hey everyone, This was a great script, thanks for helping me out.
Thanks (2 Replies)
Discussion started by: bebop1111116
2 Replies
4. Shell Programming and Scripting
Hi Guys!!
Iam new to this thread.
I have a very urgent requirement of finding the local disk space. Iam running a php script on linux machine and need to find the local disk space on the remote machines.
I tried using df -h, which works if I specify the drive name on the remote machine.... (4 Replies)
Discussion started by: navjak
4 Replies
5. Shell Programming and Scripting
Some times my disk space is used upto 100% due to the application logs .
So this script is to monitor the disk space usage and wall message to the users about the disk space usage if it exceeds the limit set in the script. Here for example the limit is set to 80%. This job is added in cron to... (2 Replies)
Discussion started by: amitranjansahu
2 Replies
6. Shell Programming and Scripting
Hi all,
FreeBSD7.1 @ sh.
In a backup script I am trying to get the blocks used by the backup once completed.
I am using the function:
#!/bin/sh
spaceused()
{
du -d 0 "${1}" | awk -F"+" '{ print $1 }
}
to return the blocks used of said directory and contents.
Via. command line... (7 Replies)
Discussion started by: Festus Hagen
7 Replies
7. UNIX Desktop Questions & Answers
Issue with disk space usage
I have the following line in my "df -h" output:
Filesystem Size Used Avail Capacity Mounted on
/dev/ad4s1a 496M 495M -39M 109% /
What is the issue with having 9% excess utilisation? How can I find out what this partition is... (2 Replies)
Discussion started by: figaro
2 Replies
8. Shell Programming and Scripting
Hi Guys,
Is there any way I can write a script that sends DISK SPACE USAGE STATUS via email once a week?
Thanks, (5 Replies)
Discussion started by: g4v1n
5 Replies
9. Shell Programming and Scripting
Given this directory /web
I need to get the current usage (in %) on Linux and Unix both using the same command on bash shell ?
The command i tried was working on Unix (solaris) but does not filter the desired same value when run of Linux.
My command df -h /web | awk '{print $5}' | sed -n... (5 Replies)
Discussion started by: mohtashims
5 Replies
10. Shell Programming and Scripting
hi all members
I have a shell script to generate disk space usage email alert if threshold is more than 80 %, now the requirement changed to keep sending alert emails for every 5% incremental usage ........ Any help would be greatly appreciated.
ex - 80% , 85% ,90%,95%,100% we should get an... (6 Replies)
Discussion started by: anil529
6 Replies
df_ufs(1M) df_ufs(1M)
NAME
df_ufs - report free disk space on ufs file systems
SYNOPSIS
df -F ufs [generic_options] [ -o i] [directory | special]
df displays the amount of disk space occupied by ufs file systems, the amount of used and available space, and how much of the file sys-
tem's total capacity has been used.The amount of space reported as used and available is less than the amount of space in the file system;
this is because the system reserves a fraction of the space in the file system to allow its file system allocation routines to work well.
The amount reserved is typically about 10%; this can be adjusted using tunefs(1M). When all the space on the file system except for this
reserve is in use, only the superuser can allocate new files and data blocks to existing files. When the file system is overallocated in
this way, df might report that the file system is more than 100% utilized.If neither directory nor special is specified, df displays infor-
mation for all mounted ufs file systems.
The following options are supported:
generic_options Options supported by the generic df command. See df(1M) for a description of these options.
-o Specify ufs file system specific options. The available option is:
i Report the number of used and free inodes. This option can not be used with generic_options.
/etc/mnttab list of file systems currently mounted
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu, SUNWxcu4 |
+-----------------------------+-----------------------------+
df(1M), fsck(1M), fstyp(1M), tunefs(1M), mnttab(4), attributes(5), ufs(7FS),
df calculates its results differently for mounted and unmounted file systems. For unmounted systems, the numbers reflect the 10% reserva-
tion. This reservation is not reflected in df output for mounted file systems. For this reason, the available space reported by the generic
command can differ from the available space reported by this module.
df might report remaining capacity even though syslog warns filesystem full. This issue can occur because df only uses the available frag-
ment count to calculate available space, but the file system requires contiguous sets of fragments for most allocations.
If you suspect that you have exhausted contiguous fragments on your file system, you can use the fstyp(1M) utility with the -v option. In
the fstyp output, look at the nbfree (number of blocks free) and nffree (number of fragments free) fields. On unmounted filesystems, you
can use fsck(1M) and observe the last line of output, which reports, among other items, the number of fragments and the degree of fragmen-
tation. See fsck(1M).
25 Feb 2005 df_ufs(1M)