Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to find the free space & usage of the particular directory in Hp-Unix? Post 302209472 by encrypted on Friday 27th of June 2008 04:13:22 AM
Old 06-27-2008
You will need the du command to find the disk usage of a directory. But it will not show you the percentage usage. You could try ncdu utility for getting a graphical (% usage) view of disk usage by direcories

HTH
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

Does unix ever misreport free space?

Hi all, Does unix ever misreport free space? We're having a problem running a utility, and the error message looks for all the world like the utility has no free space for its work files: HOST ERROR(D10681C). No space left on device. But the device itself shows ample free space. ... (3 Replies)
Discussion started by: JustKen
3 Replies

2. Shell Programming and Scripting

How do l test for carriage return & Disk space usage

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

3. Solaris

command to find free disk space on solaris

In linux df is the command to find free space what is the equivalent command in the Solaris (2 Replies)
Discussion started by: harishankar
2 Replies

4. Shell Programming and Scripting

display free space on a unix server

I need to display the amount space avalible on a unix server in an html webpage, which will automatically update every hour. I am able to do so using a javascript in a windows based server. How would i go about doing this in a unix server. Any help, suggestions, anything would be great. thanks. (3 Replies)
Discussion started by: davwel
3 Replies

5. Shell Programming and Scripting

shell script to send email with usage of space in the directory as description :

shell script to send email with usage of space in the directory as description : Please any one help me in writing a script to send email with usage of space in the directory as description . (3 Replies)
Discussion started by: sakthifire
3 Replies

6. Shell Programming and Scripting

Shell script delete log files from folder & subfolders on space usage

Hi, I am trying to write a shell script to delete logs generate by db when space in the folder reaches 70%. i am getting space values from db, find the files at OS and remove them by using a cron job runs every 5minutes. I have to keep the latest 5 files at any time, my problem is that log files... (3 Replies)
Discussion started by: saha
3 Replies

7. Shell Programming and Scripting

find the free space of a particular directory

Hi Guys, I want to find the free space of a particular directory,, Regards, Magesh (3 Replies)
Discussion started by: mac4rfree
3 Replies

8. Red Hat

How do i find free space in my unix?

Hello, I wanted to calculate free space in my unix file system. Here is my direction. I can use df -h command to get the below output. Filesystem Size Used Avail Use% Mounted on =================================================== /dev/vx/dsk/edcdg/data01vol ... (9 Replies)
Discussion started by: govindts
9 Replies

9. UNIX for Dummies Questions & Answers

Command to display the space usage (memory usage) of a specific directory.

Hi all, Can you please tell me the command, with which one can know the amount of space a specific directory has used. df -k . ---> Displays, the amount of space allocated, and used for a directory. du -k <dir name> - gives me the memory used of all the files inside <dir> But i... (2 Replies)
Discussion started by: abhisheksunkari
2 Replies

10. Red Hat

On CentOS, moving space from large free directory to another

Hi. My "/usr" folder is running out of space. My "/home" folder is quite large and has a lot of free space. As follows: Filesystem Type Size Used Avail Use% Mounted on ... /dev/sda5 ext3 9.7G 2.6G 6.7G 28% / /dev/sda7 ext3 152G 16G 128G 11% /home /dev/sda3 ... (7 Replies)
Discussion started by: pkiula
7 Replies
DU(1)							    BSD General Commands Manual 						     DU(1)

NAME
du -- display disk usage statistics SYNOPSIS
du [-Aclnx] [-H | -L | -P] [-g | -h | -k | -m] [-a | -s | -d depth] [-B blocksize] [-I mask] [-t threshold] [file ...] DESCRIPTION
The du utility displays the file system block usage for each file argument and for each directory in the file hierarchy rooted in each direc- tory argument. If no file is specified, the block usage of the hierarchy rooted in the current directory is displayed. The options are as follows: -A Display the apparent size instead of the disk usage. This can be helpful when operating on compressed volumes or sparse files. -B blocksize Calculate block counts in blocksize byte blocks. This is different from the -h, -k, -m and -g options or setting BLOCKSIZE and gives an estimate of how much space the examined file hierarchy would require on a filesystem with the given blocksize. Unless in -A mode, blocksize is rounded up to the next multiple of 512. -H Symbolic links on the command line are followed, symbolic links in file hierarchies are not followed. -I mask Ignore files and directories matching the specified mask. -L Symbolic links on the command line and in file hierarchies are followed. -P No symbolic links are followed. This is the default. -a Display an entry for each file in a file hierarchy. -c Display a grand total. -d depth Display an entry for all files and directories depth directories deep. -g Display block counts in 1073741824-byte (1 GiB) blocks. -h ``Human-readable'' output. Use unit suffixes: Byte, Kilobyte, Megabyte, Gigabyte, Terabyte and Petabyte. -k Display block counts in 1024-byte (1 kiB) blocks. -l If a file has multiple hard links, count its size multiple times. The default behavior of du is to count files with multiple hard links only once. When the -l option is specified, the hard link checks are disabled, and these files are counted (and displayed) as many times as they are found. -m Display block counts in 1048576-byte (1 MiB) blocks. -n Ignore files and directories with user ``nodump'' flag (UF_NODUMP) set. -r Generate messages about directories that cannot be read, files that cannot be opened, and so on. This is the default case. This option exists solely for conformance with X/Open Portability Guide Issue 4 (``XPG4''). -s Display an entry for each specified file. (Equivalent to -d 0) -t threshold Display only entries for which size exceeds threshold. If threshold is negative, display only entries for which size is less than the absolute value of threshold. -x File system mount points are not traversed. The du utility counts the storage used by symbolic links and not the files they reference unless the -H or -L option is specified. If either the -H or -L option is specified, storage used by any symbolic links which are followed is not counted (or displayed). The -H, -L and -P options override each other and the command's actions are determined by the last one specified. The -h, -k and -m options all override each other; the last one specified determines the block counts used. ENVIRONMENT
BLOCKSIZE If the environment variable BLOCKSIZE is set, and the -h, -k or -m options are not specified, the block counts will be displayed in units of that block size. If BLOCKSIZE is not set, and the -h, -k or -m options are not specified, the block counts will be displayed in 512-byte blocks. EXAMPLES
Show disk usage for all files in the current directory. Output is in human-readable form: # du -ah Summarize disk usage in the current directory: # du -hs Summarize disk usage for a specific directory: # du -hs /home Show name and size of all C files in a specific directory. Also display a grand total at the end: # du -ch /usr/src/sys/kern/*.c SEE ALSO
df(1), chflags(2), fts(3), symlink(7), quot(8) HISTORY
A du command appeared in Version 1 AT&T UNIX. BSD
November 4, 2012 BSD
All times are GMT -4. The time now is 09:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy