Sponsored Content
Operating Systems AIX Command to find file system details on AIX Post 302957813 by bakunin on Thursday 15th of October 2015 08:52:04 AM
Old 10-15-2015
Quote:
Originally Posted by Maddy123
Could you please explain above line with few examples as I feel difficult to understand it correctly.
When you use du -sm or du -sk or du -sg you will get all numbers in the same unit: kilobytes, megabytes, gigabytes or whatever. You can sort this output numerically and get valid results (that is, the files sorted by their size).

When you use the GNUism du -sh instead it will display the numbers in differing units and because "50M" (megabytes) is bigger than "500k" (kilobytes) but numerically smaller ("50" is smaller than "500" and sort doesn't know about units) you will get invalid results.

So, if you plan to use sort on your results you should stick to the AIX-variant of du anyways and not even think about using the GNU-variant du -h.

I hope this helps.

bakunin
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Details on the ls command and file types

Hey y'all, I need some help with the nitty gritty of the ls command. -First off in the man pages in the -l mode the first character can be "door" can anyone tell me what a door is??? -also in the -l mode the first character can be "fifo"or"pipe" can anyone tell me what a this is??? -What... (4 Replies)
Discussion started by: jacob358
4 Replies

2. UNIX for Advanced & Expert Users

How to Find AIX system parameters

System Parameters: maximum number of processes = 2048 Network parameters: ipqmaxlen - 512 rfc1323 - 1 sb_max - 1310720 (2*655360) tcp_recvspace - 65536 tcp_sendspace - 65536 Udp_recvspace - 655360 Udp_sendspace 65536 (1 Reply)
Discussion started by: R00tSc0rpi0n
1 Replies

3. UNIX for Advanced & Expert Users

Using SCP command in IBM AIX to download file from remote to local system

Hi, When i run the code in solaris unix machine, the file from remote server is getting downloaded. but when i use the same code in IBM AIX remote machine, it is not running. It is saying "Erro during scp transfer." Below is the code. Please give some resolution. SCPClient client = new... (1 Reply)
Discussion started by: gravi2020
1 Replies

4. AIX

Command to get Disk Adapter details in AIX

Hi, What is the command to get the disk adapter performance details in AIX?. Guide me. (2 Replies)
Discussion started by: maruthu
2 Replies

5. UNIX for Dummies Questions & Answers

find command AIX

Hi all , could anyone please help with find command in AIX. I am trying to find files but there are more than 30thousand files in there.I realise I need to use xargs somehow but dunno the correct way to pull this. find /log_directory/* -prune -xdev -type f -mtime +20 | xargs ls -l the... (2 Replies)
Discussion started by: erinlomo
2 Replies

6. Shell Programming and Scripting

Getting file Details with find -mmin

I'm new to this and I have done a lot of research and am 99% done with my ksh script BUT I need help with. The script looks at Journal files and reports back on any that have not been updated for 15 min. Everything works but I wanted more detail (added -ls) and now I'm getting dups. Original code:... (2 Replies)
Discussion started by: blackopz
2 Replies

7. Shell Programming and Scripting

How to find a file with a specific pattern for current sysdate & upon find email the details?

I need assistance with following requirement, I am new to Unix. I want to do the following task but stuck with file creation date(sysdate) Following is the requirement I need to create a script that will read the abc/xyz/klm folder and look for *.err files for that day’s date and then send an... (4 Replies)
Discussion started by: PreetArul
4 Replies

8. Shell Programming and Scripting

Print column details from fixed width file using awk command

hi, i have a fixed width file with multiple columns and need to print data using awk command. i use: awk -F "|" '($5 == BH) {print $1,$2,$3}' <non_AIM target>.txt for a delimiter file. but now i have a fixed width file like below: 7518 8269511BH 20141224951050N8262 11148 8269511BH... (5 Replies)
Discussion started by: kcdg859
5 Replies

9. AIX

How to find the details of Fonts on AIX?

Hi, Can someone help me out, how I can find the details of the Fonts installed on AIX, details such as the font type, directory, Non-Latin Fonts like Greek, Hebrew, or Arabic, starting with Arabic Objective: Oracle Reports creates PDF on AIX we want to use ARABIC Fonts which are... (1 Reply)
Discussion started by: filosophizer
1 Replies
di(1)							      General Commands Manual							     di(1)

Name
       di - disk information

Synopsis
       di [-AacghHklLmnPtZ] [-B block-size] [-d display-size] [-f format] [-I include-fstyp-list] [-s sort-type] [-w block-width] [-W inode-width]
       [-x exclude-fstyp-list] [-X debug-level] [-z zone-name] [file [...]]

       mi

Description
       di Displays usage information on mounted filesystems.  Block values are reported in a human readable format.  If the user or  group  has  a
       disk quota, the values reported are adjusted according the quotas that apply to the user.

       If file is specified, the usage information for the partition on which file is located is printed.

       Unless  the  -a	flag  is  specified, the following mounted filesystems will not normally be displayed: filesystems with total blocks <= 0;
       filesystems marked by the operating system as "ignore" or "none"; loopback filesystems  that  are  duplicates  of  other  normally  mounted
       filesystems (filesystem type of 'lofs' or linux 'none'); loopback filesystems that are part of a zone (Solaris).

       mi Displays the mounted filesystem information.

       Several options may be specified to control the output of di and mi:

       -A     Print all fields (used for debugging).  Mount points and special device names are printed at full width.

       -a     (compatibility: --all)
	      Prints all mounted devices (normally, those with 0 total blocks are not printed - e.g. /dev/proc, /dev/fd).

       -B     block-size (compatibility: --block-size, -b)
	      Change the base block size from 1024 (default) to the size specified.  block-size may be one of: k - 1024 bytes, si - 1000 bytes, or
	      a specific size.

       -c     (alias: --csv-output)
	      Comma separated values are output.  The titles are output as the format string specifiers.  Totals are turned off. See also  the	-n
	      flag.

       -d     display-size (alias: --display-size)
	      Display the blocks in units specified by display-size.  Note that if the base block size is SI units of 1000 bytes, the display size
	      is calculated using those units.	display-size may be one of: 512 - POSIX,  k - kilobytes,  m - megabytes,  g - gigabytes,  t - ter-
	      abytes,  p - petabytes,  e - exabytes, z - zettabytes, y - yottabytes, h - Scaled alternative 1, H - Scaled alternative 2, or a spe-
	      cific value to use as the block size.

	      Block display sizes greater than 1024 bytes are displayed with a precision of one decimal place after the radix.

	      The Scaled alternatives scale the sizes displayed and appends a suffix (e.g. 48.0k, 3.4M).

	      With scaled alternative 1, sizes within a line may scale to different units.

	      Scaled alternative 2 scales all the sizes in each individual line to the same unit size (the largest needed).

       -f     format Use the specified format string format.  See the Format Strings section.

       -g     (alias for: -dg)
	      Display sizes in gigabytes.

       -h     (alias for: -dh)
	      Display partition sizes in scaled alternative 1 format.

       --help
	      Display some basic usage information.

       -H     (alias for: -dH; compatibility: --human-readable)
	      Display partition sizes in scaled alternative 2 format.

       -I     include-fstype-list (compatibility: -F, --type)
	      Include only the file system types listed in include-fstyp-list.	The list is a comma separated list of file system types.  Multiple
	      -I options may be specified.  If the 'fuse' filesystem type is specified, all fuse* filesystems will be included.
	      e.g. -I nfs,tmpfs or -I nfs -I tmpfs.

       --inodes
	      Ignored.	Use the -f option.

       -k     (alias for: -dk)
	      Display sizes in Kbytes.

       -l     (compatibility: --local)
	      Display only local file systems.

       -L     Turn off check for duplicate filesystems (loopback (lofs/none) mounts).

       -m     (alias for: -dm)
	      Display sizes in megabytes.

       -n     Do not print a header line above the list of file systems.  Useful when parsing the output of di.

       --no-sync
	      Ignored.

       -P     (compatibility: --portability)
	      Output format is POSIX standard.	512 byte block size is the default.  The -k option may be used.

       --print-type
	      Ignored.	Use the -f option.

       -q     Disable quota checks.

       -s     sort-type
	      Use  sort-type  to  sort	the  output.  The output of di is normally sorted by mount point.  The following sort flags may be used to
	      change the sort order: m - by mount point (default); n - leave unsorted (as it appears in the mount table); s -  by  special  device
	      name; t - by filesystem type; r - reverse the sort order.

	      These sort options may be combined in any order.	e.g.: di -stsrm - by type, special, reversed mount; di -strsrm - by type, reversed
	      special, mount.

       --si   An alias for -dH -Bsi.

       --sync Ignored.

       -t     (compatibility: --total)
	      Print a totals line below the list of file systems.  Pooled filesystems (zfs, advfs) have only the main pool added to the total.	It
	      is up to the user to exclude (using the -x option) read-only filesystems (cdfs, iso9660), swap-based (memfs, mfs, tmpfs) filesystems
	      and user (fuse*) filesystems.  Excluding the 'fuse' filesystem will exclude all fuse* filesystems.

       -w     block-width
	      Set the print width for block values.  The default is eight.

       -v     Ignored.

       --version
	      Display di's version and default format string.

       -W     inode-width
	      Set the print width for inode values.  Default is seven.

       -x     exclude-fstype-list (compatibility: --exclude-type)
	      Exclude the file system types listed in exclude-fstyp-list.  The list is a comma separated list of file system types.   Multiple	-x
	      options  may be specified.  If the 'fuse' filesystem type is excluded, all fuse* filesystems will be excluded.  e.g. -x nfs,tmpfs or
	      -x nfs -x tmpfs.

       -X     level
	      Set the program's debugging level to debug-level.

       -z     zone-name
	      Display the filesystems for the specified zone.  The zone must be visible to the user.

       -Z     (alias for: -z all)
	      Display the filesystems for all visible zones.

Format Strings
       The output of di may be specified via a format string.  This string may be given either via the -f command line option or as  part  of  the
       DI_ARGS environment variable.  The format string may specify the following columns:

       m      Print the name of the mount point.

       M      Print  the  name	of  the  mount point, at full length.  The mount point is formatted to the maximum width necessary for the longest
	      mount point name.

       s      Print the file system name (special device or remote mount point).

       S      Print the file system name (special device or remote mount point), at full length.  The file system name is formatted to the maximum
	      width necessary for the longest file system name.

       t      Print the file system type.

       T      Print  the  file	system type at full length.  The file system type is formatted to the maximum width necessary for the longest file
	      system type.

       Total Available

       b      Print the total number of megabytes on the file system.

       B      Print the total number of megabytes on the file system available for use by normal users.

       In Use

       u      Print the number of megabytes in use on the file system (actual number of megabytes used = total - free).

       c      Print the number of megabytes not available for use by normal users (total - available).

       Free

       f      Print the number of free (unused) megabytes on the file system.

       v      Print the number of megabytes available for use by normal users.

       Percentage Used

       p      Print the percentage of megabytes not available for use by normal users (number of megabytes not available  for  use  /  total  disk
	      space).

       1      Print the percentage of total megabytes in use (actual number of megabytes used / total disk space).

       2      Print  the  percentage  of megabytes in use, BSD-style.  Represents the percentage of user-available space in use.  Note that values
	      over 100% are possible (actual number of megabytes used / disk space available to non-root users).

       Percentage Free

       a      Print the percentage of megabytes available for use by normal users (number of megabytes available for use / total disk space).

       3      Print the percentage of total megabytes free (actual number of megabytes free / total disk space).

       Inodes

       i      Print the total number of file slots (inodes) that can be created on the file system.

       U      Print the number of file slots in use.

       F      Print the number of file slots available.

       P      Print the percentage of file slots in use.

       Mount Information

       I      Print the time the filesystem was mounted.  This column is not supported on all systems.

       O      Print the filesystem mount options.

       The default format string for di is smbuvpT.

       The default format string for mi is MSTIO.

       The format string may also contain any other character not listed above.  The character will be printed as is.	e.g.  di  -f  'mbuvp|iUFP'
       will print the character '|' between the disk usage and the file slot usage.  The command sequence:
	      di -f 'mbuvp
	      miUFP'
       will print two lines of data for each filesystem.

Examples
       Various df equivalent format strings for System V release 4 are:
	      /usr/bin/df -v	 di -P -f msbuf1
	      /usr/bin/df -k	 di -dk -f sbcvpm
	      /usr/ucb/df	 di -dk -f sbuv2m
       GNU df:
	      df		 di -dk -f SbuvpM -w 10
	      df -T		 di -dk -f STbuvpM -w 10
       AIX df:
	      df		 di -d 512 -f Sbf1UPM -w 10
	      df -I		 di -d 512 -f Sbuf1M
	      df -I -M		 di -d 512 -f SMbuf1 -w 10
       HP-UX bdf:
	      bdf		 di -d k -f Sbuv2M
	      bdf -i		 di -d k -f Sbuv2UFPM

       If you like your numbers to add up/calculate the percentage correctly, try one of the following format strings:

	      di -f SMbuf1T
	      di -f SMbcvpT
	      di -f SMBuv2T

Environment Variables
       The  DI_ARGS  environment variable may be used to specify command line arguments.  e.g. If you always want gigabytes displayed, set DI_ARGS
       equal to "-dg".	Any command line arguments specified will override the DI_ARGS environment variable.

       The DI_LOCALE_DIR environment variable may be used to specify the location of the di program's locale message files.

       The GNU df POSIXLY_CORRECT, and DF_BLOCK_SIZE and the BSD BLOCKSIZE environment variables are honored.

Note
       For filesystems that do not report available blocks (e.g. System V release 3), the number of available blocks is considered to be the  num-
       ber of free blocks.

WARNING
Do not replace your system's df command with this program. You will in all likelihood break your installation procedures. See Also df(1), fstab(5), getmnt(2), getmntinfo(2), mnttab(4), mount(1M) statfs(2), statvfs(2) Bugs Send bug reports to: brad.lanam.di_at_gmail.com Website http://www.gentoo.com/di/ Author This program is Copyright 1994-2011 by Brad Lanam. Brad Lanam, Walnut Creek, CA (brad.lanam.di_at_gmail.com) 8 Oct 2011 di(1)
All times are GMT -4. The time now is 01:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy