Sponsored Content
Operating Systems AIX Command to find file system details on AIX Post 302957656 by MichaelFelt on Tuesday 13th of October 2015 05:57:19 PM
Old 10-13-2015
Hi Bakunin (looks funny with a cap Smilie),

Although I am getting close to 20 years professionally with AIX (and nearly 10+ more while it was not my favorite) - I have never had access to the labs.

Back in 1978 - is when I started with UNIX v6 and v7 on PDP, and "college access to the kernel". The deep stuff I learned back then.

As to things like the meaning of -h - like anyone (or perhaps I am alone) not starting in GNU/Linux, I fell over it. From AIX I was used to df -g, and when coreutils are first in my PATH that does not work. I requested it (support for -g) as a feature - and got turned down "because we have -h". That was the day I learned about "-h" and how it relates to du and ds. Looking at Maddy's question - it seems he is looking for a specific layout - with the letters K, M or G behind the number, rather than as a counter.

Maddy,

Working the way it has been in UNIX for years and years (du -sk goes back to 1978 and earlier perhaps) - is not going to work for you.

If I understand you correctly - what you are asking is not standard in UNIX aka POSIX systems. It is not even standard in Linux, because it is GNU - not Linux - who makes these choices. And GNU stands for GNU Not Unix - which they take seriously. If they feel they have a better idea, then they do it that way. They are "not UNIX/POSIX" and are free to make any change they wish. Fortunately, they also try to be compatible with POSIX behavior most of the time.

POSIX does not have -h - so GNU can define that anyway they wish. And so the following outputs show - if you need/want file system stats as you describe - either you will need to write an awk script (or something compareable) to convert the first number that AIX/POSIX du behavior is providing - OR - install coreutils.

Happy hunting!

Both AIX and COREUTILS versions give the same output for the arguments -k, (-sk to sum directories), -m or -sm.

Note the full path of the command:
AIX
Code:
michael@x071:[/home/michael]/usr/bin/du -sk /tmp/* | sort -n | tail
3520    /tmp/openssh_xxx
4704    /tmp/waitUploaderTmp_7078008.0
4704    /tmp/waitUploaderTmp_7078008.0.tmp
8452    /tmp/ibm.bff
17656   /tmp/891c0bbd
27888   /tmp/93b06705msd
40008   /tmp/aixtools.perl.5.14.4.0.I
41152   /tmp/named.tcpdump
56900   /tmp/rootvg.20140814.bff.bz2
60332   /tmp/forums.bff.bz2

COREUTILS
Code:
michael@x071:[/home/michael]/opt/bin/du -sk /tmp/* | sort -n | tail
3520    /tmp/openssh_xxx
4704    /tmp/waitUploaderTmp_7078008.0
4704    /tmp/waitUploaderTmp_7078008.0.tmp
8452    /tmp/ibm.bff
17656   /tmp/891c0bbd
27888   /tmp/93b06705msd
40008   /tmp/aixtools.perl.5.14.4.0.I
41152   /tmp/named.tcpdump
56900   /tmp/rootvg.20140814.bff.bz2
60332   /tmp/forums.bff.bz2

COREUTILS using -h
I think this is what you seem to be looking for - with the letters behind the size. However, note the very very different results when using sort!
Code:
michael@x071:[/home/michael]/opt/bin/du -sh /tmp/* | sort -n | tail
440K    /tmp/jpzcd8-alqe
440K    /tmp/jpzcdV-alqg
440K    /tmp/jpzcdYDalyc
500K    /tmp/jpzcd-4al7d
500K    /tmp/jpzcd6-alqf
500K    /tmp/jpzcdKDalyb
500K    /tmp/jpzcd_4al7c
500K    /tmp/jpzcd_6al7a

Now my largest file is not showing up at the end - because numerically "sort" 500K is larger than 59M. So, just be careful when using sort!

Code:
michael@x071:[/home/michael]/opt/bin/du -h /tmp/forums.bff.bz2        
59M     /tmp/forums.bff.bz2

 

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
All times are GMT -4. The time now is 01:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy