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
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
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
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
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
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
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
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
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
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
LEARN ABOUT HPUX
newfs_vxfs
newfs_vxfs(1M) newfs_vxfs(1M)
NAME
newfs_vxfs: newfs - create a new VxFS file system
SYNOPSIS
disk_type] swap]
[mkfs_vxfs_options] special
DESCRIPTION
builds a VxFS file system by invoking
special specifies a character (or raw) file (for example, or
Options
recognizes the following options:
Reserve space for boot programs past the end of the
file system. If the file is present on the system, sufficient space to accommodate that file is reserved; otherwise
691 kilobytes are reserved. This option decreases the size of the file system being created. This option cannot be
used if the file-system size is also specified using (see options below).
Specify the file-system type
Use disk parameters from the
disk_type named in This option is provided for backward compatibility with previous HP-UX releases. Any parameters
specified on the command line will the corresponding values in Any values not specified in the command line and not
shown in are defaulted.
Reserve swap megabytes of swap space past the end of the file system. This option decreases the size of the file system to
be created by the specified number of megabytes. cannot be used if the file-system size is also specified using (see
options below).
Specify verbose mode.
prints out its actions, including the parameters passed to
Echo the completed command line, but do not execute the command.
If not valid, prints an error message. The command line is generated by incorporating the user-specified options and
other information derived from This option allows the user to verify the command line.
NOTE: You can specify the and options in the same command line. In that case, both the requested swap space and the space needed for boot
programs are reserved. These options are used when the file system size is defaulted to the size of the entire disk.
mkfs_vxfs Options
The following additional command-line options can be used to override default parameters passed to
File system block size in bytes. The default value is
1024 bytes for systems smaller than two terabytes. For Version 5 disk layout file systems larger than two terabytes,
the maximum file system size is dependent on the block size. A four terabyte file system requires a 1K block size,
An eight terabyte file system requires a 2K block size, a 16 TB file system requires a 4K block size, and a 32 TB
file system requires an 8K block size.
Valid only for the Version 4 and 5 disk layouts.
This option controls the largefiles flag for the file system. If is specified, the bit is set and files two giga-
bytes or larger can be created. If is specified, the bit is cleared and files created on the files system are lim-
ited to less than two gigabytes. The default is See mkfs_vxfs(1M), mount_vxfs(1M), and fsadm_vxfs(1M).
File system size in
blocks (defined in The default value is the size of the entire disk or disk section, minus any swap or boot space
requested. The size specifies the number of sectors in the file system. By default, size is specified in units of
sectors. However, you can append a suffix to size to indicate another unit of measure. Append or to indicate that
the value is in kilobytes, or to indicate megabytes, or or to indicate gigabytes.
Operands
recognizes the following operand:
special A character (raw) file.
EXAMPLES
To create a VxFS file system on or and reserve 40 megabytes of swap space.
FILES
Disk description file.
Static information about the file systems.
SEE ALSO
fsadm_vxfs(1M), mkfs(1M), mkfs_vxfs(1M), mount_vxfs(1M), newfs(1M), disktab(4).
newfs_vxfs(1M)