11-25-2009
NR is an awk internal variable == number of lines processed for all input files
FNR == number of lines processed for current file
cat file | awk ........ means stdin is the file, so NR == FNR
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi All,
Will df+du=Total space allocted for a file system??
Is the above correct. Please correct me If iam wrong.
In one my programs the above is not happening.
Please help me out.
Many thanks.
Regards,
Manas (2 Replies)
Discussion started by: manas6
2 Replies
2. AIX
Hi,
I see from lsvg the total used PPs is 1050 (67200 megabytes), but when I check the disk space with df command I can only see 31G total space, can somebody tell how this come?
Thanks!
Victor
# lsvg
rootvg
# lsvg rootvg
VOLUME GROUP: rootvg VG IDENTIFIER: ... (2 Replies)
Discussion started by: victorcheung
2 Replies
3. Red Hat
Hi experts,
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda9 3.8G 1.7G 2.0G 46% /
none 369M 0 369M 0% /dev/shm
/dev/hda10 2.0G 33M 1.8G 2% /tmp
/dev/hda12 1.4G 1.2G 260M 82% /usr
I used df -h... (3 Replies)
Discussion started by: William1482
3 Replies
4. Solaris
Hi experts,
In my solaris system when i run the command df -h i got the below response.I have some confusion which i want to share with you guys.1)there are two SWAP file system shows are they same or different?2)if i want to count the total disk space should i take both the swap space or only... (2 Replies)
Discussion started by: rafiassam
2 Replies
5. Solaris
is there a command to get the total disk space (available + free) on the solaris server ?
thanks (3 Replies)
Discussion started by: sudhiroracle
3 Replies
6. Emergency UNIX and Linux Support
Hi Experts,
In a particular dir, I have many files *AJAY*.
How can I get total size of all such files.
I tried du -hs *AJAY* but it gave me individual size of all files.
All I require is summation of all.
Thanks,
Ajay (4 Replies)
Discussion started by: ajaypatil_am
4 Replies
7. Solaris
Hi Everyone,
I try to calculate the total hard disk space of a solaris machine using iostat -En command. Iterating the output and summing up all the number present near the Size: will give the exact size of the harddisk. But it is not working for a machine.
This command works in many flavors... (2 Replies)
Discussion started by: prasankn
2 Replies
8. Red Hat
Hi,
Could you please tell me the commands to find Total storage space and Serial number of Linux server.
OS -- Red Hat Enterprise Linux Server release 6.6 (Santiago)
This is 2 node cluster.
Regards,
Maddy (1 Reply)
Discussion started by: Maddy123
1 Replies
9. Shell Programming and Scripting
Hi
I am trying to calculate memory used by Linux System
free -m
total used free shared buffers cached
Mem: 32109 31010 1099 0 3600 7287
-/+ buffers/cache: 20121 11987
Swap: 10239 1282 8957
Now according to my requirement Im calculating memory using below cmd
free -m | awk 'NR==3{printf... (2 Replies)
Discussion started by: sam@sam
2 Replies
df(1B) SunOS/BSD Compatibility Package Commands df(1B)
NAME
df - display status of disk space on file systems
SYNOPSIS
/usr/ucb/df [-a] [-i] [-t type] [filesystem...] [filename...]
DESCRIPTION
The df utility displays the amount of disk space occupied by currently mounted file systems, the amount of used and available space, and
how much of the file system's total capacity has been used.
If arguments to df are path names, df produces a report on the file system containing the named file. Thus `df .' shows the amount of
space on the file system containing the current directory.
OPTIONS
The following options are supported:
-a Report on all filesystems including the uninteresting ones which have zero total blocks (that is, auto-mounter).
-i Report the number of used and free inodes. Print ` * ' if no information is available.
-t type Report on filesystems of a given type (for example, nfs or ufs).
EXAMPLES
Example 1: Using df
A sample of output for df looks like:
example% df
Filesystem kbytes used avail capacity Mounted on
sparky:/ 7445 4714 1986 70% /
sparky:/usr 42277 35291 2758 93% /usr
Note that used+avail is less than the amount of space in the file system (kbytes); 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 (see tunefs(1M)). When all the space on a file system except for this reserve is in use, only the super-user can
allocate new files and data blocks to existing files. When a file system is overallocated in this way, df can report that the file system
is more than 100% utilized.
FILES
/etc/mnttab List of file systems currently mounted
/etc/vfstab List of default parameters for each file system
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWscpu |
+-----------------------------+-----------------------------+
SEE ALSO
du(1), quot(1M), tunefs(1M), mnttab(4), attributes(5)
SunOS 5.10 14 Sep 1992 df(1B)