01-17-2013
This is from the
Linux info pages:
Quote:
For each directory that is listed, preface the files with a line
`total BLOCKS', where BLOCKS is the total disk allocation for all
files in that directory. The block size currently defaults to 1024
bytes, but this can be overridden (*note Block size::). The
BLOCKS computed counts each hard link separately; this is arguably
a deficiency.
Last edited by radoulov; 01-17-2013 at 06:43 AM..
8 More Discussions You Might Find Interesting
1. HP-UX
I am on HP-UX delta B.11.11
I am using sem_open() and compiling/linking the library by specifying -lrt.
Then, I am creating library like below:
ar cr $libdir/liboscfe.a `cat fe.libs.$$ com.libs.$$`
ranlib $libdir/liboscfe.a
Now, I am compiling another utility sch2db which requires this... (1 Reply)
Discussion started by: apadha
1 Replies
2. UNIX for Dummies Questions & Answers
Ok, another fun hiccup in my UNIX learning curve. I am trying to count the number of occurrences of an IP address across multiple files named example.hits. I can extract the number of occurrences from the files individually but when you use grep -c with multiple files you get the output similar to... (5 Replies)
Discussion started by: MrAd
5 Replies
3. Shell Programming and Scripting
----------------------------------------------------------------------
I have tried
find . type -f -exec ls -lrt {} \;
but it listed files recursively ,I need only that dir files not internal dir file.
--------------------------------------------------------------------- (8 Replies)
Discussion started by: RahulJoshi
8 Replies
4. Shell Programming and Scripting
Hi all,
I have multiple dat files one for each day of the year and each with two lengthy columns. For each file, I wan't to perform a mathematical operation on the data of column 2 (red), then get the mean of these values and create a new two-column file where each row shows the mean value and... (3 Replies)
Discussion started by: larrymuli
3 Replies
5. UNIX for Dummies Questions & Answers
I have a requirement in which I shud use ls -lrt instead of ls command because when we use ls command we get an error..the script part where i get error is given below
for SAPRESPONSEFILES in `ls $SAPRESPONSEGOFILE | sed "s/go/dat/g"`
basically the script processes the files of format... (11 Replies)
Discussion started by: praviper
11 Replies
6. Shell Programming and Scripting
Good afternoon! Im new at scripting and Im trying to write a script to
calculate total space, total used space and total free space in filesystem names matching a keyword (in this one we will use keyword virginia). Please dont be mean or harsh, like I said Im new and trying my best. Scripting... (4 Replies)
Discussion started by: bigben1220
4 Replies
7. Shell Programming and Scripting
I am doing
ls -lrt
and it does not respond and have to close the xterm
ls
works ok (4 Replies)
Discussion started by: kristinu
4 Replies
8. Shell Programming and Scripting
uadm@4132> ls -lrt
-rw------- 1 uadm uadm 3811819 Jun 6 04:08 data_log-2010.05.30-10:04:08.txt
-rw------- 1 uadm uadm 716246 Jun 13 01:38 data_log-2010.06.06-10:04:08.txt
-rw------- 1 uadm uadm 996 Jun 13 04:00 data_log-2010.06.06-10:04:22.txt
-rw------- 1 uadm uadm 7471 Jun 20 02:03... (5 Replies)
Discussion started by: mail2sant
5 Replies
DU(1) BSD General Commands Manual DU(1)
NAME
du -- display disk usage statistics
SYNOPSIS
du [-H | -L | -P] [-a | -d depth | -s] [-cghkmnrx] [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:
-H Symbolic links on the command line are followed. (Symbolic links encountered in the tree traversal are not followed.)
-L All symbolic links are followed.
-P No symbolic links are followed.
-a Display an entry for each file in the file hierarchy.
-c Display the grand total after all the arguments have been processed.
-d Display an entry files and directories depth directories deep.
-g If the -g flag is specified, the number displayed is the number of gigabyte (1024*1024*1024 bytes) blocks.
-h If the -h flag is specified, the numbers will be displayed in "human-readable" format. Use unit suffixes: B (Byte), K (Kilobyte), M
(Megabyte), G (Gigabyte), T (Terabyte) and P (Petabyte).
-k By default, du displays the number of blocks as returned by the stat(2) system call, i.e. 512-byte blocks. If the -k flag is speci-
fied, the number displayed is the number of kilobyte (1024 bytes) blocks. Partial numbers of blocks are rounded up.
-m If the -m flag is specified, the number displayed is the number of megabyte (1024*1024 bytes) blocks.
-n Ignore files and directories with user "nodump" flag (UF_NODUMP) set.
-r Generate warning messages about directories that cannot be read. This is the default behaviour.
-s Display only the grand total for the specified files.
-x Filesystem mount points are not traversed.
du 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. The -H, -L and -P options over-
ride each other and the command's actions are determined by the last one specified.
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 -g, -h, -k, and -m options are not specified, the block counts will be dis-
played in units of that size block.
SEE ALSO
df(1), chflags(2), fts(3), getbsize(3), symlink(7), quot(8)
HISTORY
A du command appeared in Version 6 AT&T UNIX.
BSD
September 24, 2006 BSD