Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

du(1) [plan9 man page]

DU(1)							      General Commands Manual							     DU(1)

NAME
du - disk usage SYNOPSIS
du [ -a ] [ -bsize ] [ file ... ] DESCRIPTION
Du gives the number of Kbytes allocated to data blocks of named files and, recursively, of files in named directories. It assumes storage is quantized in units of 1024 bytes (Kbytes) by default. Other values can be set by the -b option; size is the number of bytes, optionally suffixed k to specify multiplication by 1024. If file is missing, the current directory is used. The count for a directory includes the counts of the contained files and directories. The -a option prints the number of blocks for every file in a directory. Normally counts are printed only for contained directories. SOURCE
/sys/src/cmd/du.c DU(1)

Check Out this Related Man Page

DU(1)							    BSD General Commands Manual 						     DU(1)

NAME
du -- display disk usage statistics SYNOPSIS
du [-H | -L | -P] [-I mask] [-a | -s | -d depth] [-c] [-h | -k] [-x] [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. If the -k flag is specified, the number of 1024-byte blocks used by the file is displayed, otherwise getbsize(3) is used to determine the preferred block size. Partial numbers of blocks are rounded up. The options are as follows: -H Symbolic links on the command line are followed, symbolic links in file hierarchies are not followed. -L Symbolic links on the command line and in file hierarchies are followed. -I mask Ignore files and directories matching the specified mask. -P No symbolic links are followed. This is the default. -a Display an entry for each file in a file hierarchy. -h "Human-readable" output. Use unit suffixes: Byte, Kilobyte, Megabyte, Gigabyte, Terabyte and Petabyte -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) -d depth Display an entry for all files and directories depth directories deep. -c Display a grand total. -k Display block counts in 1024-byte (1-Kbyte) blocks. -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 options are specified, storage used by any symbolic links which are followed is not counted or displayed. Files having multiple hard links are counted (and displayed) a single time per du execution. ENVIRONMENT
BLOCKSIZE If the environment variable BLOCKSIZE is set, and the -k option is not specified, the block counts will be displayed in units of that size block. If BLOCKSIZE is not set, and the -k option is not specified, the block counts will be displayed in 512-byte blocks. SEE ALSO
df(1), fts(3), symlink(7), quot(8) HISTORY
A du command appeared in Version 1 AT&T UNIX. BSD
April 1, 1994 BSD
Man Page

15 More Discussions You Might Find Interesting

1. Solaris

Coredumps and swap - was part of Solaris Mem Consumption

We have Sun OS running on spark : SunOS ciniwnpr67 5.10 Generic_118833-24 sun4u sparc SUNW,Sun-Fire-V440 Having Physical RAM : Sol10box # prtconf | grep Mem Memory size: 8192 Megabytes My Top Output is : 130 processes: 129 sleeping, 1 on cpu CPU states: 98.8% idle, 0.2% user, 1.0%... (39 Replies)
Discussion started by: rajwinder
39 Replies

2. Solaris

Solaris Mem Consumption

We have Sun OS running on spark : SunOS ciniwnpr67 5.10 Generic_118833-24 sun4u sparc SUNW,Sun-Fire-V440 Having Physical RAM : Sol10box # prtconf | grep Mem Memory size: 8192 Megabytes My Top Output is : 130 processes: 129 sleeping, 1 on cpu CPU states: 98.8% idle, 0.2% user, 1.0%... (27 Replies)
Discussion started by: rajwinder
27 Replies

3. Shell Programming and Scripting

concatenate all duplicate line in a file.

Hi All, i have a zip file like the format 794051400123|COM|24|0|BD|R|99.98 794051413727|COM|11|0|BD|R|28.99 794051415622|COM|23|0|BD|R|28.99 883929004676|COM|0|0|BD|R|28.99 794051400123|MOM|62|0|BD|R|99.98 794051413727|MOM|4|0|BD|R|28.99 794051415622|MOM|80|0|BD|R|28.99 ... (30 Replies)
Discussion started by: vaskarbasak
30 Replies

4. IP Networking

Automated FTP task

Every day i ftp tar.gz a file from the production server to a back up machine.. This task creates way to much traffic on the network at the end of the day and puts and undo load on the production machine during operation hours. i would like to create a script that would automatically fire off the... (36 Replies)
Discussion started by: LowOrderBit
36 Replies

5. Programming

write() issue during a low level hdd access

Hi, I am trying to write zeroes to the hdd using a c program. I don't want to use the dd or ddrescue or any such inbuilt program because of reasons like real time progress, writing custom patterns. (my program is more like an erasure application, but does only zero fill). here are the steps... (35 Replies)
Discussion started by: sponnusa
35 Replies

6. Programming

AIX calling WINSOCK during e-mail - normal?

Hey everyone, I'm completely stumped on this. An AIX machine I'm working on is attempting to send email, but the SMTP connection is failing. I have no idea what this code does or if it should even work. If someone could give me a hand, or a suggestion on what else to use, I would appreciate... (54 Replies)
Discussion started by: ctote
54 Replies

7. Programming

Running bin file from a module

Hi I actually wrote a simple module and I need to call a bin file from that module. Could you give me some hints how to do that? (I tried with stdlib.h and 'system()', but cannot call that function from a module). Regards. (28 Replies)
Discussion started by: Chrisdot
28 Replies

8. Fedora

Is Kernel module is the same as a device driver?

I have been reading prep questions for my second unix academy exam, and there's a nuance, I'm not sure I understand it correctly. I've been under impression from my readings of book by Evi Nemeth and from unix academy DVDs I've been watching, that kernel's modules are drivers. I think of it, as... (25 Replies)
Discussion started by: newlinuxuser1
25 Replies

9. Shell Programming and Scripting

Run stored procedure from shell script

Hello all, I am trying to run stored procrdure from shell script which takes one argument. And also I want to verify in the script whether the script executed successfully. However the Stored procedure is not running from shell script. Manually if I run it update the data in the table. Can... (29 Replies)
Discussion started by: PriyaSri
29 Replies

10. SCO

du and dfspace reporting

Hi, I am using SCO UNIX version 6.0.0 release 5. I am using du and df space to see the used space in the / partition. I am using du -k option to get count in 1024 k so that it directly makes kb. In dfspace I subtracted the used mb from total size mb which should be the used space and then... (40 Replies)
Discussion started by: dextergenious
40 Replies

11. Programming

Incompatiblity of the code due to CC compiler version mismatch.

Incompatiblity of the code due to CC compiler version mismatch. I have a machine with Machine A-- Operating System:SunOs 5.8 Generic_117350-45 sun4u sparc SUNW,Ultra-80(solaris 5.8) CC Compiler:CC: WorkShop Compilers 4.2 16 Jun 1998 C++ 4.2 patch 104631-07 we have compiled C++... (36 Replies)
Discussion started by: Revathi R
36 Replies

12. Shell Programming and Scripting

Honey, I broke awk! (duplicate line removal in 30M line 3.7GB csv file)

I have a script that builds a database ~30 million lines, ~3.7 GB .cvs file. After multiple optimzations It takes about 62 min to bring in and parse all the files and used to take 10 min to remove duplicates until I was requested to add another column. I am using the highly optimized awk code: awk... (34 Replies)
Discussion started by: Michael Stora
34 Replies

13. UNIX for Dummies Questions & Answers

Produce the number 2014 without any numbers in your source code...

Hi guys and gals... Someone pointed me to this URL this morning and thought I might be interested. Not the best bash solution but at my level I solved it this way, in around 5-10 minutes... What about your attempts... Produce the number 2014 without any numbers in your source code -... (40 Replies)
Discussion started by: wisecracker
40 Replies

14. Shell Programming and Scripting

BASH Execution Delay / Speedup

I have a BASH script that runs a continuous loop, reading a line from a file, and then spawning a background process to use it. I've placed "date" commands inside it to see where it's slowing down, and everything inside -- including reading the line from the file -- is fast, but the loop bogs... (34 Replies)
Discussion started by: gmark99
34 Replies

15. Shell Programming and Scripting

Ufsrestore

Good Afternoon, I'm going to attempt a ufsrestore of a Solaris 9 machine from a connected NAS containing the ufsdumps. The idea is to be able to take ufsdumps of a failed machine (machine 1), and use them to set up a backup machine (machine 2). (I'm testing for disaster recovery) Note... (52 Replies)
Discussion started by: Stellaman1977
52 Replies